(* Content-type: application/mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 6.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       145,          7]
NotebookDataLength[    201456,       5170]
NotebookOptionsPosition[    191664,       4881]
NotebookOutlinePosition[    192029,       4897]
CellTagsIndexPosition[    191986,       4894]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[
 RowBox[{"<<", "ACPackages`"}]], "Input",
 CellChangeTimes->{{3.418311793374*^9, 3.418311795829*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"SetWorkDir", "[", "\"\<2009.11.05/k03\>\"", "]"}]], "Input",
 CellChangeTimes->{{3.4453328532655*^9, 3.4453328580155*^9}, {
   3.454838133375*^9, 3.454838139015625*^9}, {3.45535407415625*^9, 
   3.455354082921875*^9}, {3.45552094125*^9, 3.45552094575*^9}, {
   3.462600101796875*^9, 3.46260011165625*^9}, {3.462600184875*^9, 
   3.462600196390625*^9}, {3.462605620578125*^9, 3.46260562090625*^9}, {
   3.462610048203125*^9, 3.46261004834375*^9}, {3.4659824629317503`*^9, 
   3.4659824659942503`*^9}, {3.466227769129125*^9, 3.466227771801*^9}, 
   3.466229491722875*^9, 3.46622989064475*^9, {3.466232551316625*^9, 
   3.466232557176*^9}, 3.466233180004125*^9, 3.466237730660375*^9, {
   3.4662378743635*^9, 3.466237874676*^9}, 3.466238201441625*^9, {
   3.4664110516975927`*^9, 3.4664110517913427`*^9}, 3.4664112039475927`*^9, {
   3.4664112663694677`*^9, 3.4664112664319677`*^9}, 3.4664158063382177`*^9, {
   3.4664171762444677`*^9, 3.4664171787444677`*^9}, {3.4664176991350927`*^9, 
   3.4664177011038427`*^9}, {3.4664181055100927`*^9, 
   3.4664181059632177`*^9}, {3.4664183694319677`*^9, 3.4664183730569677`*^9}, 
   3.4664195369475927`*^9, 3.4664206030569677`*^9, {3.466493742571875*^9, 
   3.466493743915625*^9}, {3.4665090994468*^9, 3.4665091028578*^9}, {
   3.4665099373677998`*^9, 3.4665099439028*^9}, {3.4665100122938004`*^9, 
   3.4665100137058*^9}}],

Cell[BoxData["\<\"D:\\\\\:0420\:0430\:0431\:043e\:0442\:0430\\\\Programs\\\\\
torMHD\\\\2009.11.05\\\\k03\"\>"], "Output",
 CellChangeTimes->{3.4665099442218*^9, 3.4665100140438004`*^9, 
  3.4668366934288*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"SetDirectory", "[", 
  "\"\<\\\\\\\\amazonka\\\\home\\\\Anton\\\\programs\\\\torMHD\\\\2009.11.05\\\
\\k03\>\"", "]"}]], "Input",
 CellChangeTimes->{{3.4667480518208*^9, 3.4667480806928*^9}, {
  3.4669160572757998`*^9, 3.4669160575228*^9}}],

Cell[BoxData["\<\"\\\\\\\\amazonka\\\\home\\\\Anton\\\\programs\\\\torMHD\\\\\
2009.11.05\\\\k03\"\>"], "Output",
 CellChangeTimes->{{3.4667480746247997`*^9, 3.4667480835158*^9}, 
   3.4668367223438*^9, 3.4669160584997997`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"SetWorkDir", "[", "\"\<2009.09.23\>\"", "]"}]], "Input",
 CellChangeTimes->{
  3.444556170503946*^9, {3.4453206197319*^9, 3.4453206232079*^9}, {
   3.4453291255589*^9, 3.4453291278479*^9}, {3.4536270490625*^9, 
   3.4536270635625*^9}, {3.453627211875*^9, 3.45362721890625*^9}, {
   3.4536272711875*^9, 3.453627273890625*^9}, {3.453627363203125*^9, 
   3.453627363421875*^9}, {3.45543629975*^9, 3.4554363015*^9}, {
   3.45916428246875*^9, 3.459164283546875*^9}, {3.4619993045*^9, 
   3.4619993111875*^9}, 3.4620861518125*^9, {3.462361149390625*^9, 
   3.4623611535625*^9}, {3.463662288921875*^9, 3.4636623011875*^9}, {
   3.4659783601348753`*^9, 3.4659783620411253`*^9}, {3.4659784239161253`*^9, 
   3.4659784247911253`*^9}, 3.4659799521817503`*^9, {3.4659806570880003`*^9, 
   3.4659806590880003`*^9}, {3.4661061162442503`*^9, 
   3.4661061183848753`*^9}, {3.4661358383380003`*^9, 
   3.4661358386036253`*^9}, {3.4661409977130003`*^9, 
   3.4661410000567503`*^9}, {3.4661437695411253`*^9, 
   3.4661437697286253`*^9}, {3.4661544271192503`*^9, 
   3.4661544282130003`*^9}, {3.4664903794*^9, 3.466490380790625*^9}}],

Cell[BoxData["\<\"D:\\\\Home\\\\Anton\\\\programs\\\\torMHD\\\\2009.09.23\"\>\
"], "Output",
 CellChangeTimes->{
  3.444556170707946*^9, 3.444563243993946*^9, 3.444737201757*^9, 
   3.445239060501542*^9, 3.4453206240949*^9, 3.4453281599699*^9, 
   3.4453318127855*^9, {3.453627054109375*^9, 3.453627064015625*^9}, {
   3.45362721221875*^9, 3.453627219390625*^9}, 3.453627274203125*^9, 
   3.453627363640625*^9, 3.45543631903125*^9, 3.455450045890625*^9, 
   3.459163134421875*^9, 3.45916428375*^9, 3.459241683984375*^9, {
   3.461999306578125*^9, 3.461999311359375*^9}, 3.46208615253125*^9, 
   3.46209407075*^9, 3.462102194515625*^9, 3.46217205996875*^9, 
   3.462361153703125*^9, {3.463662294703125*^9, 3.463662301671875*^9}, 
   3.4659784251661253`*^9, 3.4659799524473753`*^9, 3.4659806592130003`*^9, 
   3.4661061189473753`*^9, 3.4661358391505003`*^9, 3.4661410006036253`*^9, 
   3.4661421511973753`*^9, 3.4661437699317503`*^9, 3.4661544285880003`*^9, 
   3.4661620592233*^9, 3.46621632001975*^9, 3.46649038105625*^9, 
   3.46649064705625*^9, 3.46649102336875*^9, 3.466491646775*^9, 
   3.4664921337125*^9, 3.466493191353125*^9, 3.46649995015*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"SetWorkDir", "[", "\"\<Debug\>\"", "]"}]], "Input",
 CellChangeTimes->{{3.45923382290625*^9, 3.459233827203125*^9}}],

Cell[BoxData["\<\"D:\\\\programs\\\\icmm\\\\torMHD\\\\Debug\"\>"], "Output",
 CellChangeTimes->{3.45923382746875*^9, 3.478829958444212*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"$HistoryLength", "=", "0"}], ";"}]], "Input"],

Cell[CellGroupData[{

Cell["\:0427\:0442\:0435\:043d\:0438\:0435 \:0441\:043f\:0438\:0441\:043a\
\:043e\:0432", "Subsection",
 CellChangeTimes->{{3.4361824985*^9, 3.436182504578125*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"Off", "[", 
   RowBox[{"Thread", "::", "tdlen"}], "]"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"lv", "=", 
   RowBox[{"ReadList", "[", "\"\<vv.dat\>\"", "]"}]}], ";", 
  RowBox[{"lv", "=", 
   RowBox[{"Map", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{"#", "\[LeftDoubleBracket]", 
         RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], ",", 
        RowBox[{"#", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}],
        "}"}], "&"}], ",", "lv"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"ltm", "=", 
   RowBox[{"Flatten", "[", 
    RowBox[{"First", "/@", "lv"}], "]"}]}], ";"}], "\n", 
 RowBox[{"{", 
  RowBox[{
   RowBox[{"Length", "[", "ltm", "]"}], ",", 
   RowBox[{"Last", "[", "ltm", "]"}]}], "}"}]}], "Input",
 CellChangeTimes->{{3.3960002006979976`*^9, 3.3960002014509974`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"203", ",", "5.82`*^-6"}], "}"}]], "Output",
 CellChangeTimes->{3.395821800757*^9, 3.395897331743*^9, 3.395899856762*^9, 
  3.3959990760429974`*^9, 3.3960002023479977`*^9, 3.4085197758190002`*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"PrintRange", "[", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"First", "[", "#", "]"}], ",", 
       RowBox[{"Max", "[", 
        RowBox[{"Last", "[", "#", "]"}], "]"}]}], "}"}], "&"}], "/@", "lv"}], 
   ",", "All", ",", 
   RowBox[{"PlotLabel", "->", "\"\<Maximum of stream velocity\>\""}]}], 
  "]"}]], "Input",
 CellChangeTimes->{3.395821803665*^9}],

Cell[BoxData[
 RowBox[{"Export", "[", 
  RowBox[{"\"\<energy5.dat\>\"", ",", 
   RowBox[{"Transpose", "@", 
    RowBox[{"Join", "[", 
     RowBox[{
      RowBox[{"{", "ltm", "}"}], ",", 
      RowBox[{"Map", "[", 
       RowBox[{"Last", ",", 
        RowBox[{"{", 
         RowBox[{
         "mp", ",", "mdp", ",", "mvx", ",", "mdvx", ",", "mvy", ",", "mdvy", 
          ",", "mvz", ",", "mdvz", ",", "mAx", ",", "mdAx", ",", "mAy", ",", 
          "mdAy", ",", "mAz", ",", "mdAz", ",", "mBx", ",", "mBy", ",", "mBz",
           ",", "mqp", ",", "mqvx", ",", "mqvy", ",", "mqvz", ",", "mqAx", 
          ",", "mqAy", ",", "mqAz", ",", "mqBx", ",", "mqBy", ",", "mqBz"}], 
         "}"}], ",", 
        RowBox[{"{", "2", "}"}]}], "]"}]}], "]"}]}]}], "]"}]], "Input",
 CellChangeTimes->{{3.4119212950629997`*^9, 3.4119213045950003`*^9}, {
  3.411921341668*^9, 3.411921369223*^9}}],

Cell[BoxData[{
 RowBox[{"PrintRange", "[", 
  RowBox[{
   RowBox[{"dif", "[", "ltm", "]"}], ",", "All", ",", 
   RowBox[{"PlotLabel", "->", "\"\<Time step\>\""}]}], 
  "]"}], "\[IndentingNewLine]", 
 RowBox[{"PrintRange", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"{", 
     RowBox[{
      RowBox[{
       RowBox[{"#", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
       "/", "3"}], ",", 
      RowBox[{"#", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], 
     "}"}], "&"}], "/@", 
   RowBox[{"(", 
    RowBox[{"mqvx", "+", "mqvy", "+", "mqvz"}], ")"}]}], "]"}]}], "Input",
 CellChangeTimes->{{3.4156990880644884`*^9, 3.4156990886645484`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"len", "=", 
   RowBox[{"Transpose", "[", 
    RowBox[{"Import", "[", 
     RowBox[{"\"\<energy.dat\>\"", ",", "\"\<Table\>\""}], "]"}], "]"}]}], 
  ";"}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"len", "=", 
   RowBox[{"Transpose", "[", 
    RowBox[{"Select", "[", 
     RowBox[{
      RowBox[{"Import", "[", 
       RowBox[{"\"\<energy.dat\>\"", ",", "\"\<Table\>\""}], "]"}], ",", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"First", "[", "#", "]"}], ">", "0"}], ")"}], "&"}]}], "]"}], 
    "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ltm", "=", 
   RowBox[{"First", "[", "len", "]"}]}], ";", 
  RowBox[{"PrintRange", "[", 
   RowBox[{
    RowBox[{"Transpose", "[", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"Drop", "[", 
        RowBox[{"ltm", ",", "1"}], "]"}], ",", 
       RowBox[{"dif", "[", "ltm", "]"}]}], "}"}], "]"}], ",", "All", ",", 
    RowBox[{"PlotLabel", "->", 
     RowBox[{"\"\<Time step. Last=\>\"", "<>", 
      RowBox[{"ToString", "[", 
       RowBox[{"Last", "[", "ltm", "]"}], "]"}]}]}]}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "mp", ",", "mdp", ",", "mvx", ",", "mdvx", ",", "mvy", ",", "mdvy", ",", 
      "mvz", ",", "mdvz", ",", "mAx", ",", "mdAx", ",", "mAy", ",", "mdAy", 
      ",", "mAz", ",", "mdAz", ",", "mBx", ",", "mBy", ",", "mBz", ",", "mqp",
       ",", "mqvx", ",", "mqvy", ",", "mqvz", ",", "mqAx", ",", "mqAy", ",", 
      "mqAz", ",", "mqBx", ",", "mqBy", ",", "mqBz"}], "}"}], "=", 
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", 
       RowBox[{"{", 
        RowBox[{"ltm", ",", "#"}], "}"}], "]"}], "&"}], "/@", 
     RowBox[{"Drop", "[", 
      RowBox[{"len", ",", "2"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", 
  RowBox[{"(*", 
   RowBox[{"PrintRange", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{
         RowBox[{"#", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
         "/", "3"}], ",", 
        RowBox[{"#", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}],
        "}"}], "&"}], "/@", 
     RowBox[{"(", 
      RowBox[{"mqvx", "+", "mqvy", "+", "mqvz"}], ")"}]}], "]"}], 
   "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{"PrintRange", "[", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"#", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
        "/", "3"}], ",", 
       RowBox[{"Log", "[", 
        RowBox[{"10", ",", 
         RowBox[{
         "#", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], 
        "]"}]}], "}"}], "&"}], "/@", 
    RowBox[{"(", 
     RowBox[{"mqvx", "+", "mqvy", "+", "mqvz"}], ")"}]}], ",", "All", ",", 
   RowBox[{"PlotLabel", "\[Rule]", 
    RowBox[{"\"\<Last energy=\>\"", "<>", 
     RowBox[{"ToString", "[", 
      RowBox[{"Last", "[", 
       RowBox[{"Last", "[", 
        RowBox[{"mqvx", "+", "mqvy", "+", "mqvz"}], "]"}], "]"}], "]"}]}]}]}],
   "]"}], "\[IndentingNewLine]", 
 RowBox[{"PrintRange", "[", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"#", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
        "/", "3"}], ",", 
       RowBox[{"Log", "[", 
        RowBox[{"10", ",", 
         RowBox[{
         "#", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], 
        "]"}]}], "}"}], "&"}], "/@", 
    RowBox[{"(", 
     RowBox[{"mqBx", "+", "mqBy", "+", "mqBz"}], ")"}]}], ",", "All", ",", 
   "\[IndentingNewLine]", 
   RowBox[{"PlotLabel", "\[Rule]", 
    RowBox[{"\"\<Last energy=\>\"", "<>", 
     RowBox[{"ToString", "[", 
      RowBox[{"Last", "[", 
       RowBox[{"Last", "[", 
        RowBox[{"mqBx", "+", "mqBy", "+", "mqBz"}], "]"}], "]"}], "]"}]}]}]}],
   "]"}]}], "Input",
 CellChangeTimes->{{3.395821810158*^9, 3.3958218234230003`*^9}, 
   3.395842386082*^9, {3.3959942473796*^9, 3.3959942775256*^9}, 
   3.3959990851589975`*^9, 3.408519827112*^9, {3.4085199685030003`*^9, 
   3.4085199721809998`*^9}, {3.408523680314*^9, 3.408523683005*^9}, {
   3.408523760568*^9, 3.408523763465*^9}, {3.408524195633*^9, 
   3.4085242044110003`*^9}, {3.409567684186*^9, 3.4095676869820004`*^9}, {
   3.411278618098*^9, 3.41127861859*^9}, {3.411278661243*^9, 
   3.411278661674*^9}, {3.4113750589110003`*^9, 3.41137505923*^9}, {
   3.411721744043*^9, 3.411721744212*^9}, 3.411814654814*^9, 3.4123412374*^9, 
   3.412341651447*^9, 3.4123574371549997`*^9, 3.4123581250039997`*^9, 
   3.412358262223*^9, 3.4123583164969997`*^9, {3.415640840615*^9, 
   3.4156408500810003`*^9}, {3.4162814919309998`*^9, 3.416281506709*^9}, 
   3.41655419221*^9, 3.416564140802*^9, {3.4165748570030003`*^9, 
   3.4165748869890003`*^9}, 3.416575273749*^9, 3.416575310836*^9, 
   3.416580366032*^9, 3.416580397729*^9, 3.416580578803*^9, {
   3.416633754105*^9, 3.416633771119*^9}, 3.416898358594*^9, 
   3.416898406552*^9, 3.416902779934*^9, 3.416903583559*^9, 
   3.417155562546*^9, {3.417237419899*^9, 3.4172374202469997`*^9}, {
   3.417237570934*^9, 3.417237572792*^9}, 3.4172387284849997`*^9, 
   3.417239034575*^9, {3.41831180219*^9, 3.4183118026429996`*^9}, 
   3.4183119797*^9, {3.418312044646*^9, 3.418312044767*^9}, {
   3.418314397318*^9, 3.418314397644*^9}, {3.418320056972*^9, 
   3.418320057611*^9}, {3.418360689082*^9, 3.41836068935*^9}, {
   3.436203781635*^9, 3.436203790126*^9}, {3.4362039004049997`*^9, 
   3.436203919209*^9}, 3.436598444609375*^9, {3.436599819328125*^9, 
   3.436599829203125*^9}, {3.4365998634375*^9, 3.436599878046875*^9}, {
   3.43659991228125*^9, 3.436599914140625*^9}, 3.436608800171875*^9, {
   3.436680231609375*^9, 3.436680233015625*^9}, 3.4366838528125*^9, {
   3.437816823421875*^9, 3.437816824046875*^9}, {3.437818706640625*^9, 
   3.4378187074375*^9}, {3.43789433353125*^9, 3.437894334234375*^9}, {
   3.43789815071875*^9, 3.437898151234375*^9}, {3.43799097628125*^9, 
   3.437990977046875*^9}, {3.438927450671875*^9, 3.438927451625*^9}, {
   3.44472516671875*^9, 3.44472516796875*^9}, 3.445242855046875*^9, 
   3.44524383646875*^9, {3.454742432609375*^9, 3.454742443109375*^9}, {
   3.454742551515625*^9, 3.45474255859375*^9}, {3.4547466361875*^9, 
   3.454746637515625*^9}, {3.454825052671875*^9, 3.45482505309375*^9}, 
   3.459252028234375*^9, 3.459334332578125*^9, {3.461994627292968*^9, 
   3.4619946988109674`*^9}, 3.4619951526359673`*^9, {3.4619956438339677`*^9, 
   3.4619956500379677`*^9}, {3.4619965824419675`*^9, 3.461996585705968*^9}, {
   3.4625188570321903`*^9, 3.4625188578561907`*^9}, {3.4625192195371904`*^9, 
   3.4625192201421905`*^9}, {3.46251973281219*^9, 3.4625197403591905`*^9}, 
   3.4625329811803904`*^9, 3.4625330126673903`*^9, {3.46622497289475*^9, 
   3.466224979191625*^9}, 3.466227824754125*^9, {3.46622785808225*^9, 
   3.466227866535375*^9}, 3.466229535285375*^9, 3.466229895676*^9, 
   3.466233187926*^9, 3.466233247066625*^9, 3.466233320222875*^9, 
   3.4662377368635*^9, {3.4664110743850927`*^9, 3.4664110890569677`*^9}, 
   3.4664111703069677`*^9, 3.4664112074475927`*^9, 3.4664159099632177`*^9, 
   3.4664171832444677`*^9, {3.4667483290568*^9, 3.4667483305788*^9}, {
   3.5006582251875*^9, 3.500658230546875*^9}}],

Cell[BoxData[
 GraphicsBox[{{}, {}, 
   {Hue[0.67, 0.6, 0.6], 
    LineBox[{{0.1829576582, 0.1829576582}, {0.7362486025, 0.5532909443}, {
     1.204934377, 0.46868577450000004`}, {1.692469669, 0.487535292}, {
     2.199477474, 0.507007805}, {2.677142292, 0.47766481800000005`}, {
     3.160290467, 0.48314817499999974`}, {3.647664006, 0.487373539}, {
     4.140053431, 0.49238942500000027`}, {4.625829792, 0.4857763610000001}, {
     5.115918529, 0.4900887369999998}, {5.591335183, 0.475416654}, {
     6.080632504, 0.48929732100000045`}, {6.571186648, 
     0.49055414399999986`}, {7.050124133, 0.47893748499999944`}, {7.532907429,
      0.48278329600000003`}}]}},
  AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
  Axes->True,
  AxesOrigin->{1., 0.2},
  PlotLabel->FormBox["\"Time step. Last=7.53291\"", TraditionalForm],
  PlotRange->{All, All},
  PlotRangeClipping->True,
  PlotRangePadding->{Automatic, Automatic}]], "Output",
 CellChangeTimes->{3.4665092962047997`*^9, 3.4665099652338*^9, 
  3.4665100495078*^9, 3.4667481169138002`*^9, 3.4667483587868*^9, 
  3.4668367126907997`*^9, 3.4668371590917997`*^9, 3.478829963572212*^9}],

Cell[BoxData[
 GraphicsBox[{{}, {}, 
   {Hue[0.67, 0.6, 0.6], 
    LineBox[{{0., -0.27300090964514373`}, {
     0.1829576582, -0.20620396092958732`}, {
     0.7362486025, -0.03386634357014901}, {1.204934377, 0.0853918052218887}, {
     1.6924696689999998`, 0.19074497251426753`}, {2.199477474, 
     0.28506507217029087`}, {2.677142292, 0.36289002246265056`}, {3.160290467,
      0.43291254282692976`}, {3.647664006, 0.49629049552719556`}, {
     4.140053431, 0.5541579944092053}, {4.625829791999999, 
     0.6061166091367493}, {5.115918529, 0.65411301343045}, {5.591335183, 
     0.6969895942682208}, {6.080632504, 0.73780214013224}, {6.571186647999999,
      0.7757387226357358}, {7.050124132999999, 0.810217593605427}, {
     7.532907429, 0.8426829243970961}}]}},
  AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
  Axes->True,
  AxesOrigin->{0, 0},
  PlotLabel->FormBox["\"Last energy=6.96118\"", TraditionalForm],
  PlotRange->{All, All},
  PlotRangeClipping->True,
  PlotRangePadding->{Automatic, Automatic}]], "Output",
 CellChangeTimes->{3.4665092962047997`*^9, 3.4665099652338*^9, 
  3.4665100495078*^9, 3.4667481169138002`*^9, 3.4667483587868*^9, 
  3.4668367126907997`*^9, 3.4668371590917997`*^9, 3.4788299635852118`*^9}],

Cell[BoxData[
 GraphicsBox[{},
  AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
  Axes->True,
  AxesOrigin->{0, 0},
  PlotLabel->FormBox["\"Last energy=0\"", TraditionalForm],
  PlotRange->{All, All},
  PlotRangeClipping->True,
  PlotRangePadding->{Automatic, Automatic}]], "Output",
 CellChangeTimes->{3.4665092962047997`*^9, 3.4665099652338*^9, 
  3.4665100495078*^9, 3.4667481169138002`*^9, 3.4667483587868*^9, 
  3.4668367126907997`*^9, 3.4668371590917997`*^9, 3.478829963594212*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"ListPlot", "[", 
  RowBox[{"mqvx", "+", "mqvy", "+", "mqvz"}], "]"}]], "Input",
 CellChangeTimes->{{3.4631148263599997`*^9, 3.4631148286376*^9}, {
  3.4631149116140003`*^9, 3.4631149125811996`*^9}}],

Cell[BoxData[
 RowBox[{"ListLogPlot", "[", 
  RowBox[{
   RowBox[{"mqBx", "+", "mqBy", "+", "mqBz"}], ",", 
   RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.4631148365312*^9, 3.4631148451268*^9}, {
  3.4667485038887997`*^9, 3.4667485078958*^9}}],

Cell[BoxData[
 RowBox[{"ListLogPlot", "[", 
  RowBox[{
   RowBox[{
   "mqBx", "+", "mqBy", "+", "mqBz", "+", "mqvx", "+", "mqvy", "+", "mqvz"}], 
   ",", 
   RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.466313624734*^9, 3.466313625579*^9}, {
  3.4667485120618*^9, 3.4667485159368*^9}}],

Cell[BoxData[
 RowBox[{"MapThread", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"PrintRange", "[", 
     RowBox[{"#1", ",", "All", ",", 
      RowBox[{"PlotLabel", "\[Rule]", "#2"}]}], "]"}], "&"}], ",", 
   "\[IndentingNewLine]", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"Map", "[", 
        RowBox[{
         RowBox[{"Function", "[", 
          RowBox[{"l", ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{
             "l", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",", 
             FractionBox[
              RowBox[{"Log", "[", 
               RowBox[{
               "l", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
               "]"}], "2"]}], "}"}]}], "]"}], ",", "#"}], "]"}], "&"}], "/@", 
      RowBox[{"{", 
       RowBox[{"mqvx", ",", "mqvy", ",", "mqvz", ",", "mqp"}], "}"}]}], ",", 
     RowBox[{"{", 
      RowBox[{
      "\"\<Mean quadratic of vr\>\"", ",", 
       "\"\<Mean quadratic of v\[Phi]\>\"", ",", 
       "\"\<Mean quadratic of vz\>\"", ",", "\"\<Mean quadratic of p\>\""}], 
      "}"}]}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{
  3.3958218286099997`*^9, 3.436243824834*^9, {3.437816568*^9, 
   3.437816571078125*^9}, 3.437898162484375*^9, {3.438597670375*^9, 
   3.438597672484375*^9}, {3.438934742*^9, 3.4389347606875*^9}, {
   3.444634692046875*^9, 3.4446346928125*^9}}],

Cell[BoxData[
 RowBox[{"grs", "=", 
  RowBox[{"MapThread", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"PrintRange", "[", 
      RowBox[{"#1", ",", "All", ",", 
       RowBox[{"PlotLabel", "\[Rule]", "#2"}]}], "]"}], "&"}], ",", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"Map", "[", 
         RowBox[{
          RowBox[{"Function", "[", 
           RowBox[{"l", ",", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{
              "l", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
              ",", 
              FractionBox[
               RowBox[{"Log", "[", 
                RowBox[{
                "l", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
                "]"}], "2"]}], "}"}]}], "]"}], ",", "#"}], "]"}], "&"}], "/@", 
       RowBox[{"{", 
        RowBox[{"mqAx", ",", "mqAy", ",", "mqAz"}], "}"}]}], ",", 
      RowBox[{"{", 
       RowBox[{
       "\"\<Mean quadratic of Ar\>\"", ",", 
        "\"\<Mean quadratic of A\[Phi]\>\"", ",", 
        "\"\<Mean quadratic of Az\>\""}], "}"}]}], "}"}]}], "]"}]}]], "Input",
 CellChangeTimes->{3.395821832632*^9}],

Cell[BoxData[
 RowBox[{"MapThread", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"PrintRange", "[", 
     RowBox[{"#1", ",", "All", ",", 
      RowBox[{"PlotLabel", "\[Rule]", "#2"}]}], "]"}], "&"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"Map", "[", 
        RowBox[{
         RowBox[{"Function", "[", 
          RowBox[{"l", ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{
             "l", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",", 
             FractionBox[
              RowBox[{"Log", "[", 
               RowBox[{"Abs", "[", 
                RowBox[{
                "l", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
                "]"}], "]"}], "2"]}], "}"}]}], "]"}], ",", "#"}], "]"}], 
       "&"}], "/@", 
      RowBox[{"{", 
       RowBox[{"mdAx", ",", "mdAy", ",", "mdAz"}], "}"}]}], ",", 
     RowBox[{"{", 
      RowBox[{
      "\"\<Difference of Ar\>\"", ",", "\"\<Difference of A\[Phi]\>\"", ",", 
       "\"\<Difference of Az\>\""}], "}"}]}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{
  3.3958218366619997`*^9, {3.417403800567*^9, 3.417403802439*^9}}],

Cell[BoxData[
 RowBox[{"MapThread", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"PrintRange", "[", 
     RowBox[{"#1", ",", "All", ",", 
      RowBox[{"PlotLabel", "\[Rule]", "#2"}]}], "]"}], "&"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"Map", "[", 
        RowBox[{
         RowBox[{"Function", "[", 
          RowBox[{"l", ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{
             "l", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",", 
             FractionBox[
              RowBox[{"Log", "[", 
               RowBox[{"Abs", "[", 
                RowBox[{
                "l", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
                "]"}], "]"}], "2"]}], "}"}]}], "]"}], ",", "#"}], "]"}], 
       "&"}], "/@", 
      RowBox[{"{", 
       RowBox[{"mdvx", ",", "mdvy", ",", "mdvz", ",", "mdp"}], "}"}]}], ",", 
     RowBox[{"{", 
      RowBox[{
      "\"\<Difference of vr\>\"", ",", "\"\<Difference of v\[Phi]\>\"", ",", 
       "\"\<Difference of vz\>\"", ",", "\"\<Difference of pressure\>\""}], 
      "}"}]}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{
  3.3958218366619997`*^9, {3.417403800567*^9, 3.417403802439*^9}, {
   3.437814662140625*^9, 3.437814664390625*^9}, {3.445686787921875*^9, 
   3.44568679234375*^9}, {3.455429377078125*^9, 3.455429385625*^9}}],

Cell[BoxData[
 RowBox[{"grs", "=", 
  RowBox[{"MapThread", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"PrintRange", "[", 
      RowBox[{"#1", ",", "Automatic", ",", 
       RowBox[{"PlotLabel", "\[Rule]", "#2"}]}], "]"}], "&"}], ",", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"dif", "[", 
         RowBox[{"Map", "[", 
          RowBox[{
           RowBox[{"Function", "[", 
            RowBox[{"l", ",", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{
               "l", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
               ",", 
               FractionBox[
                RowBox[{"Log", "[", 
                 RowBox[{
                 "l", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
                 "]"}], "2"]}], "}"}]}], "]"}], ",", "#"}], "]"}], "]"}], 
        "&"}], "/@", 
       RowBox[{"{", 
        RowBox[{"mqBx", ",", "mqBy", ",", "mqBz"}], "}"}]}], ",", 
      RowBox[{"{", 
       RowBox[{
       "\"\<difMean quadratic of Br\>\"", ",", 
        "\"\<difMean quadratic of B\[Phi]\>\"", ",", 
        "\"\<difMean quadratic of Bz\>\""}], "}"}]}], "}"}]}], 
   "]"}]}]], "Input",
 CellChangeTimes->{
  3.395821840993*^9, {3.436685266625*^9, 3.436685325953125*^9}, {
   3.437818755375*^9, 3.43781876103125*^9}, {3.438673573125*^9, 
   3.438673573625*^9}, {3.4390192359375*^9, 3.43901924425*^9}, {
   3.455514816375*^9, 3.455514819703125*^9}, {3.459251389984375*^9, 
   3.45925139525*^9}}],

Cell[BoxData[
 RowBox[{"PrintRange", "@", 
  RowBox[{"Select", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"Function", "[", 
      RowBox[{"l", ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"l", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
         ",", 
         FractionBox[
          RowBox[{"Log", "[", 
           RowBox[{
           "l", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "]"}],
           "2"]}], "}"}]}], "]"}], "/@", "mqBy"}], ",", 
    RowBox[{
     RowBox[{
      RowBox[{"First", "[", "#", "]"}], ">", "0.0"}], "&"}]}], 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.436512834921875*^9, 3.436512875890625*^9}, {
   3.437906318390625*^9, 3.437906319796875*^9}, 3.439016044265625*^9}],

Cell[BoxData[
 RowBox[{"grs", "=", 
  RowBox[{"MapThread", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"PrintRange", "[", 
      RowBox[{"#1", ",", "All", ",", 
       RowBox[{"PlotLabel", "\[Rule]", "#2"}]}], "]"}], "&"}], ",", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"Map", "[", 
         RowBox[{
          RowBox[{"Function", "[", 
           RowBox[{"l", ",", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{
              "l", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
              ",", 
              RowBox[{"Log", "[", 
               RowBox[{"Abs", "[", 
                RowBox[{
                "l", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
                "]"}], "]"}]}], "}"}]}], "]"}], ",", "#"}], "]"}], "&"}], "/@", 
       RowBox[{"{", 
        RowBox[{"mAx", ",", "mAy", ",", "mAz"}], "}"}]}], ",", 
      RowBox[{"{", 
       RowBox[{
       "\"\<Maximum of Ar\>\"", ",", "\"\<Maximum of A\[Phi]\>\"", ",", 
        "\"\<Maximum of Az\>\""}], "}"}]}], "}"}]}], "]"}]}]], "Input",
 CellChangeTimes->{
  3.395821842606*^9, {3.437906334875*^9, 3.43790633571875*^9}}],

Cell[BoxData[
 RowBox[{"grs", "=", 
  RowBox[{"MapThread", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"PrintRange", "[", 
      RowBox[{"#1", ",", "Automatic", ",", 
       RowBox[{"PlotLabel", "\[Rule]", "#2"}]}], "]"}], "&"}], ",", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"Map", "[", 
         RowBox[{
          RowBox[{"Function", "[", 
           RowBox[{"l", ",", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{
              "l", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
              ",", 
              RowBox[{"10", "^", 
               RowBox[{"Log", "[", 
                RowBox[{"10", ",", 
                 RowBox[{"Abs", "[", 
                  RowBox[{
                  "l", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}],
                   "]"}]}], "]"}]}]}], "}"}]}], "]"}], ",", "#"}], "]"}], 
        "&"}], "/@", 
       RowBox[{"{", 
        RowBox[{"mvx", ",", "mvy", ",", "mvz", ",", "mp"}], "}"}]}], ",", 
      RowBox[{"{", 
       RowBox[{
       "\"\<Maximum of vr\>\"", ",", "\"\<Maximum of v\[Phi]\>\"", ",", 
        "\"\<Maximum of vz\>\"", ",", "\"\<Maximum of pressure\>\""}], 
       "}"}]}], "}"}]}], "]"}]}]], "Input",
 CellChangeTimes->{
  3.395821844674*^9, {3.395846857821*^9, 3.395846858201*^9}, {
   3.436203833391*^9, 3.436203840637*^9}, {3.43651291378125*^9, 
   3.43651291575*^9}, {3.445326584171875*^9, 3.4453265856875*^9}, {
   3.4554293623125*^9, 3.455429368984375*^9}}],

Cell[BoxData[
 RowBox[{"grs", "=", 
  RowBox[{"MapThread", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"PrintRange", "[", 
      RowBox[{"#1", ",", "Automatic", ",", 
       RowBox[{"PlotLabel", "\[Rule]", "#2"}]}], "]"}], "&"}], ",", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"Map", "[", 
         RowBox[{
          RowBox[{"Function", "[", 
           RowBox[{"l", ",", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{
              "l", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
              ",", 
              RowBox[{"Log", "[", 
               RowBox[{"10", ",", 
                RowBox[{"Abs", "[", 
                 RowBox[{
                 "l", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
                 "]"}]}], "]"}]}], "}"}]}], "]"}], ",", "#"}], "]"}], "&"}], "/@", 
       RowBox[{"{", 
        RowBox[{"mBx", ",", "mBy", ",", "mBz"}], "}"}]}], ",", 
      RowBox[{"{", 
       RowBox[{
       "\"\<Point of Br\>\"", ",", "\"\<Point of B\[Phi]\>\"", ",", 
        "\"\<Point of Bz\>\""}], "}"}]}], "}"}]}], "]"}]}]], "Input",
 CellChangeTimes->{
  3.395821844674*^9, {3.395846857821*^9, 3.395846858201*^9}, {
   3.436244036943*^9, 3.436244044542*^9}, {3.445252031359375*^9, 
   3.44525205240625*^9}, {3.4661409825723753`*^9, 3.4661409857755003`*^9}}],

Cell[BoxData[
 RowBox[{"ListLogPlot", "[", "mqBx", "]"}]], "Input",
 CellChangeTimes->{{3.436680452515625*^9, 3.4366804668125*^9}, {
   3.43668436521875*^9, 3.436684366640625*^9}, 3.4379121758125*^9, {
   3.437981265734375*^9, 3.43798127603125*^9}, {3.4665094595748*^9, 
   3.4665094604178*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["\:0427\:0442\:0435\:043d\:0438\:0435 \:0441\:043d\:0438\:043c\:043a\
\:043e\:0432", "Subsection",
 CellChangeTimes->{{3.436182532734375*^9, 3.43618253675*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"HarmClearance", "[", "l_", "]"}], ":=", 
  RowBox[{"Divide", "@@", 
   RowBox[{"Take", "[", 
    RowBox[{
     RowBox[{"Sort", "[", 
      RowBox[{"Take", "[", 
       RowBox[{
        RowBox[{"Abs", "@", 
         RowBox[{"Fourier", "@", "l"}]}], ",", 
        RowBox[{"Ceiling", "[", 
         RowBox[{
          RowBox[{"Length", "[", "l", "]"}], "/", "2"}], "]"}]}], "]"}], 
      "]"}], ",", 
     RowBox[{"-", "2"}]}], "]"}]}]}]], "Input",
 CellChangeTimes->{{3.417190497507*^9, 3.417190593575*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"out", "=."}], ";", 
  RowBox[{"ReadBinarySnapFiles", "[", 
   RowBox[{
   "\"\<ponom_\>\"", ",", "\"\<_39152.snp\>\"", ",", "6", ",", "out", ",", 
    RowBox[{"PrintInfo", "\[Rule]", "None"}]}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"coor", ",", "bounds", ",", "node"}], "}"}], "=", 
   RowBox[{"ReadAuxFiles", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"\"\<coord\>\"", ",", "\"\<node\>\""}], "}"}], ",", 
     RowBox[{"ShiftVector", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], ",", 
     RowBox[{"ProcDistrib", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"4", ",", "1", ",", "4"}], "}"}]}], ",", 
     RowBox[{"NumberOfRefs", "\[Rule]", "4"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}], "=", 
   RowBox[{"rotc", "[", 
    RowBox[{
     RowBox[{"Sequence", "@@", 
      RowBox[{"Take", "[", 
       RowBox[{"out", ",", 
        RowBox[{"-", "3"}]}], "]"}]}], ",", "3"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"PrintRange", "[", 
  RowBox[{"WithoutFict", "@", 
   RowBox[{"Bx", "\[LeftDoubleBracket]", 
    RowBox[{"10", ",", "All", ",", "25"}], "\[RightDoubleBracket]"}]}], 
  "]"}], "\n", 
 RowBox[{"PrintRange", "[", 
  RowBox[{"Take", "[", 
   RowBox[{
    RowBox[{"Abs", "@", 
     RowBox[{"Fourier", "@", 
      RowBox[{"WithoutFict", "@", 
       RowBox[{"Bx", "\[LeftDoubleBracket]", 
        RowBox[{"15", ",", "All", ",", "15"}], 
        "\[RightDoubleBracket]"}]}]}]}], ",", "14"}], "]"}], 
  "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"-", "10"}], 
  RowBox[{"Log", "[", 
   RowBox[{"10", ",", 
    RowBox[{"HarmClearance", "[", 
     RowBox[{"WithoutFict", "@", 
      RowBox[{"Bx", "\[LeftDoubleBracket]", 
       RowBox[{"13", ",", "All", ",", "8"}], "\[RightDoubleBracket]"}]}], 
     "]"}]}], "]"}]}]}], "Input",
 CellChangeTimes->{{3.4168932787530003`*^9, 3.416893310177*^9}, {
   3.416893356575*^9, 3.4168933580299997`*^9}, {3.4168934265769997`*^9, 
   3.416893427936*^9}, {3.4168934610950003`*^9, 3.41689346249*^9}, {
   3.416893510848*^9, 3.416893512126*^9}, {3.416893600233*^9, 
   3.416893600987*^9}, {3.416897350363*^9, 3.416897351219*^9}, {
   3.416897396752*^9, 3.416897397564*^9}, {3.416897435906*^9, 
   3.41689743708*^9}, {3.416897557703*^9, 3.4168975610150003`*^9}, {
   3.416897607668*^9, 3.41689760994*^9}, {3.416897662266*^9, 
   3.416897662995*^9}, {3.416897713324*^9, 3.416897713815*^9}, {
   3.41689775876*^9, 3.416897759484*^9}, {3.416901316703*^9, 
   3.416901321855*^9}, {3.4169014916809998`*^9, 3.416901492336*^9}, {
   3.416901539367*^9, 3.416901541093*^9}, {3.416901581928*^9, 
   3.416901582817*^9}, {3.416902389617*^9, 3.416902389908*^9}, {
   3.4169025082860003`*^9, 3.416902509112*^9}, {3.416902667987*^9, 
   3.416902668585*^9}, {3.416902712559*^9, 3.416902713183*^9}, {
   3.416902838322*^9, 3.416902842392*^9}, {3.416902963605*^9, 
   3.4169029670699997`*^9}, {3.416903028328*^9, 3.416903030435*^9}, {
   3.416903128244*^9, 3.4169031288*^9}, {3.416903914105*^9, 
   3.416903921351*^9}, {3.416905052824*^9, 3.416905053308*^9}, {
   3.416905089525*^9, 3.4169050904820004`*^9}, {3.416905129442*^9, 
   3.416905130362*^9}, {3.417166387795*^9, 3.4171663969370003`*^9}, {
   3.417166493425*^9, 3.41716652281*^9}, {3.417166788781*^9, 
   3.417166789659*^9}, {3.417166825875*^9, 3.417166855376*^9}, {
   3.4171668894040003`*^9, 3.4171668952390003`*^9}, {3.41716694633*^9, 
   3.417166946962*^9}, {3.417167172865*^9, 3.41716717404*^9}, {
   3.417167214685*^9, 3.417167215458*^9}, {3.41716727838*^9, 
   3.417167279734*^9}, {3.417170118645*^9, 3.417170129892*^9}, {
   3.4171886939960003`*^9, 3.417188723474*^9}, {3.417188804421*^9, 
   3.4171888057469997`*^9}, {3.417189065896*^9, 3.4171890742460003`*^9}, {
   3.417190281043*^9, 3.4171902818269997`*^9}, {3.417190334684*^9, 
   3.417190335263*^9}, {3.4171903755150003`*^9, 3.417190376876*^9}, {
   3.417190436633*^9, 3.417190437014*^9}, {3.417190469052*^9, 
   3.417190469894*^9}, {3.4171909766289997`*^9, 3.4171909973269997`*^9}, {
   3.417191039057*^9, 3.41719104626*^9}, {3.417191147573*^9, 
   3.417191183683*^9}, {3.417191243648*^9, 3.417191249326*^9}, {
   3.417191340057*^9, 3.417191347793*^9}, {3.417191414394*^9, 
   3.417191416282*^9}, 3.4171914527720003`*^9, 3.417191609432*^9, 
   3.41719167385*^9, {3.4171927305620003`*^9, 3.417192744565*^9}, {
   3.417194019288*^9, 3.417194020585*^9}, {3.417194080276*^9, 
   3.417194082685*^9}, {3.417194144224*^9, 3.417194145652*^9}, {
   3.417194224387*^9, 3.417194225068*^9}, {3.4171942943929996`*^9, 
   3.417194295899*^9}, {3.41719439088*^9, 3.417194402822*^9}, {
   3.417194576637*^9, 3.417194629508*^9}, {3.417194714175*^9, 
   3.417194715257*^9}, {3.4171947594449997`*^9, 3.417194760074*^9}, {
   3.417238657159*^9, 3.417238658186*^9}, {3.417238791909*^9, 
   3.417238792645*^9}, {3.417241266648*^9, 3.4172412992650003`*^9}, {
   3.417241404859*^9, 3.417241420243*^9}, {3.417241455935*^9, 
   3.417241476969*^9}, {3.417241513532*^9, 3.417241514553*^9}, {
   3.417241549896*^9, 3.417241580917*^9}, {3.41724316705*^9, 
   3.417243187179*^9}, {3.417243500422*^9, 3.417243501171*^9}, {
   3.417243565709*^9, 3.4172435667939997`*^9}, {3.417246165874*^9, 
   3.4172461668929996`*^9}, {3.417400684486*^9, 3.417400695677*^9}, {
   3.41740132946*^9, 3.4174013311730003`*^9}, {3.417401367907*^9, 
   3.4174013704440002`*^9}, {3.417408632582*^9, 3.417408633585*^9}, {
   3.417408996074*^9, 3.4174089965950003`*^9}, {3.417409084583*^9, 
   3.417409085342*^9}, {3.417409237842*^9, 3.417409238301*^9}, {
   3.417409599842*^9, 3.4174096003*^9}, {3.4174122300039997`*^9, 
   3.417412239084*^9}, {3.4174122747320004`*^9, 3.417412276196*^9}, {
   3.417412406837*^9, 3.4174124073570004`*^9}, {3.417412475276*^9, 
   3.417412475675*^9}, {3.417412844256*^9, 3.417412845104*^9}, {
   3.417412885106*^9, 3.417412886146*^9}, {3.417412933258*^9, 
   3.417412933925*^9}, {3.417413002016*^9, 3.417413002875*^9}, {
   3.4174131475039997`*^9, 3.417413148609*^9}, {3.417413346546*^9, 
   3.417413347329*^9}, {3.417413424057*^9, 3.417413426501*^9}, {
   3.417413467961*^9, 3.417413468685*^9}, {3.417495831075*^9, 
   3.417495870111*^9}, {3.417496145585*^9, 3.417496146398*^9}, {
   3.417496462142*^9, 3.417496470675*^9}, {3.4174965301730003`*^9, 
   3.4174965308970003`*^9}, {3.417496808558*^9, 3.417496809262*^9}, {
   3.417496975342*^9, 3.417496975784*^9}, {3.4181168474738736`*^9, 
   3.418116847854912*^9}, {3.4181204414072313`*^9, 3.418120442671357*^9}, {
   3.4181205128323727`*^9, 3.418120513813471*^9}, {3.418312104799*^9, 
   3.418312105984*^9}, {3.4183121394849997`*^9, 3.4183122199639997`*^9}, {
   3.418313644446*^9, 3.41831364502*^9}, {3.418314010401*^9, 
   3.418314010948*^9}, {3.418314043467*^9, 3.418314043773*^9}, {
   3.418314166567*^9, 3.4183141677469997`*^9}, {3.4183144146400003`*^9, 
   3.418314432605*^9}, {3.418314566177*^9, 3.418314566336*^9}, {
   3.418314873432*^9, 3.4183148894379997`*^9}, {3.418317629112*^9, 
   3.418317636609*^9}, {3.41831767238*^9, 3.4183176747209997`*^9}, 
   3.418317761332*^9, {3.4183177921879997`*^9, 3.418317793574*^9}, {
   3.418317981429*^9, 3.418317982256*^9}, {3.418320860885*^9, 
   3.418320877211*^9}, {3.418321170204*^9, 3.418321171558*^9}, {
   3.418360710135*^9, 3.418360711539*^9}, {3.418360904198*^9, 
   3.418360904832*^9}, {3.4183612356800003`*^9, 3.418361236967*^9}, {
   3.418371412498*^9, 3.4183714140769997`*^9}, {3.418371493172*^9, 
   3.41837149349*^9}, {3.418371854012*^9, 3.4183718543059998`*^9}, {
   3.4183721141070004`*^9, 3.418372114852*^9}, {3.41837234535*^9, 
   3.418372346135*^9}, {3.418376956*^9, 3.41837696074*^9}, {3.418377056781*^9,
    3.418377057248*^9}, {3.418443754201*^9, 3.418443755117*^9}, {
   3.418443925513*^9, 3.418443926304*^9}, {3.418444034332*^9, 
   3.418444034892*^9}, {3.418444103564*^9, 3.4184441045299997`*^9}, {
   3.418446288101*^9, 3.418446294979*^9}, {3.4184463902860003`*^9, 
   3.418446391821*^9}, {3.418448238492*^9, 3.418448239226*^9}, {
   3.418448321111*^9, 3.41844832212*^9}, {3.418448710557*^9, 
   3.418448711024*^9}, {3.418449035873*^9, 3.4184490378789997`*^9}, {
   3.418449423385*^9, 3.418449424766*^9}, {3.418449503663*^9, 
   3.4184495043900003`*^9}, {3.418450144701*^9, 3.41845014517*^9}, {
   3.418535000133563*^9, 3.4185350003075633`*^9}, {3.418535085191563*^9, 
   3.4185350933915634`*^9}, {3.4185351999655633`*^9, 3.418535200633563*^9}, {
   3.4185353705805635`*^9, 3.418535371491563*^9}, {3.418535426968563*^9, 
   3.418535427823563*^9}, {3.418535537585563*^9, 3.418535538244563*^9}, {
   3.4185402353255634`*^9, 3.4185402417225633`*^9}, {3.418540508008563*^9, 
   3.418540509197563*^9}}],

Cell[BoxData["17.613028373402315`"], "Output",
 CellChangeTimes->{
  3.4172435296549997`*^9, 3.4172435933389997`*^9, 3.417246194888*^9, 
   3.417400697068*^9, 3.417400729301*^9, 3.417401235957*^9, 
   3.4174013484630003`*^9, 3.417401387479*^9, 3.4174086610559998`*^9, 
   3.41740884456*^9, 3.417409016359*^9, 3.417409104859*^9, 
   3.4174092589370003`*^9, 3.417409621308*^9, 3.4174122618129997`*^9, 
   3.4174122994700003`*^9, 3.417412430951*^9, 3.417412499204*^9, 
   3.4174128688190002`*^9, 3.417412910267*^9, 3.417412957717*^9, 
   3.417413027271*^9, 3.417413172631*^9, 3.4174133721070004`*^9, 
   3.417413451237*^9, 3.417413493605*^9, {3.417495857133*^9, 
   3.417495884686*^9}, 3.417496051402*^9, 3.417496160362*^9, 
   3.417496494898*^9, 3.417496555251*^9, 3.417496834542*^9, 
   3.4174970031099997`*^9, 3.418116898763002*^9, 3.4181204758836784`*^9, 
   3.4181205742675157`*^9, 3.418312122113*^9, {3.418312167191*^9, 
   3.418312223007*^9}, 3.41831364826*^9, {3.418314024697*^9, 
   3.4183140468719997`*^9}, 3.4183141706809998`*^9, {3.418314422249*^9, 
   3.4183144363929996`*^9}, {3.418314554025*^9, 3.418314569844*^9}, 
   3.418314646137*^9, {3.418314877156*^9, 3.418314892583*^9}, 
   3.418317653446*^9, 3.4183176918900003`*^9, 3.418317811291*^9, 
   3.4183180001099997`*^9, {3.418320870296*^9, 3.418320899197*^9}, 
   3.418321193638*^9, 3.418360780329*^9, 3.418360927829*^9, 3.418361261495*^9,
    3.4183714698459997`*^9, 3.4183715260150003`*^9, 3.418371882033*^9, 
   3.418372143309*^9, 3.4183723733199997`*^9, 3.418376979408*^9, 
   3.418377072987*^9, 3.418443775049*^9, 3.418443949928*^9, 3.41844404938*^9, 
   3.418444119392*^9, 3.4184463180109997`*^9, 3.4184481184700003`*^9, 
   3.41844826133*^9, 3.418448479051*^9, 3.418448733722*^9, 3.418449070168*^9, 
   3.418449471076*^9, 3.4184495267530003`*^9, 3.418450918402*^9, 
   3.4185351281035633`*^9, 3.418535228493563*^9, 3.418535396175563*^9, 
   3.418535455558563*^9, 3.4185355625495634`*^9, 3.418540291902563*^9, 
   3.418540352444563*^9, 3.418540532468563*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"EstimateBoundary", "/@", 
  RowBox[{"{", 
   RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}]}]], "Input",
 CellChangeTimes->{{3.4183126759849997`*^9, 3.418312693566*^9}, {
  3.418312840145*^9, 3.418312852071*^9}, {3.418313497415*^9, 
  3.4183135033640003`*^9}, {3.4183135400220003`*^9, 3.418313551764*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "127.80349045822669`", ",", "0.992456735083146`", ",", 
   "21.270453676967858`"}], "}"}]], "Output",
 CellChangeTimes->{3.418444119821*^9, 3.4184463192320004`*^9, 
  3.418448262289*^9, 3.4184488418459997`*^9, 3.4184490708929996`*^9, 
  3.418449471528*^9, 3.4184495272460003`*^9, 3.4184509208570004`*^9, 
  3.418535128875563*^9, 3.418535228982563*^9, 3.4185353967005634`*^9, 
  3.4185354560565634`*^9, 3.418535563048563*^9, 3.418540532866563*^9, 
  3.436244868682*^9}]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{
    "p1", ",", "vx1", ",", "vy1", ",", "vz1", ",", "Axm1", ",", "Aym1", ",", 
     "Azm1", ",", "nutm1"}], "}"}], "=", 
   RowBox[{"{", 
    RowBox[{
    "p", ",", "vx", ",", "vy", ",", "vz", ",", "Axm", ",", "Aym", ",", "Azm", 
     ",", "nutm"}], "}"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{
    "p1", ",", "vx1", ",", "vy1", ",", "vz1", ",", "Ax1", ",", "Ay1", ",", 
     "Az1", ",", "nut1"}], "}"}], "=", 
   RowBox[{"{", 
    RowBox[{
    "p", ",", "vx", ",", "vy", ",", "vz", ",", "Ax", ",", "Ay", ",", "Az", 
     ",", "nut"}], "}"}]}], ";"}]}], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{
    "p1", ",", "vx1", ",", "vy1", ",", "vz1", ",", "Ax1", ",", "Ay1", ",", 
     "Az1", ",", "nut1"}], "}"}], "=", "out"}], ";"}]], "Input",
 CellChangeTimes->{{3.4095653445699997`*^9, 3.409565345447*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{
    "p2", ",", "vx2", ",", "vy2", ",", "vz2", ",", "Ax2", ",", "Ay2", ",", 
     "Az2", ",", "nut2"}], "}"}], "=", "out"}], ";"}]], "Input",
 CellChangeTimes->{{3.4095653595690002`*^9, 3.40956536877*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Max", "/@", 
  RowBox[{"Abs", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "p1", ",", "vx1", ",", "vy1", ",", "vz1", ",", "Ax1", ",", "Ay1", ",", 
      "Az1", ",", "nut1"}], "}"}], "-", 
    RowBox[{"{", 
     RowBox[{
     "p2", ",", "vx2", ",", "vy2", ",", "vz2", ",", "Ax2", ",", "Ay2", ",", 
      "Az2", ",", "nut2"}], "}"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.409565370896*^9, 3.4095653871*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "1.`", ",", "1.5`", ",", "1.`", ",", "1.899999976158142`", ",", 
   "1.0319336913526058`", ",", "1.011904988437891`", ",", 
   "1.0319351591169834`", ",", "1.`"}], "}"}]], "Output",
 CellChangeTimes->{3.409565388469*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"GetInner", "[", 
   RowBox[{"ar_", "?", "ArrayQ"}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "b", "}"}], ",", 
    RowBox[{"Switch", "[", 
     RowBox[{
      RowBox[{"Length", "[", 
       RowBox[{"Dimensions", "[", "ar", "]"}], "]"}], ",", "3", ",", 
      RowBox[{"Transpose", "[", 
       RowBox[{
        RowBox[{
         RowBox[{
          FractionBox[
           RowBox[{"node", "/.", 
            RowBox[{"b_", "\[RuleDelayed]", 
             RowBox[{"BitAnd", "[", 
              RowBox[{"b", ",", "8"}], "]"}]}]}], "8"], "#"}], "&"}], "/@", 
        RowBox[{"Transpose", "[", "ar", "]"}]}], "]"}], ",", "2", ",", 
      RowBox[{
       FractionBox[
        RowBox[{"node", "/.", 
         RowBox[{"b_", "\[RuleDelayed]", 
          RowBox[{"BitAnd", "[", 
           RowBox[{"b", ",", "8"}], "]"}]}]}], "8"], "ar"}], ",", "_", ",", 
      "$Failed"}], "]"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.419769262608*^9, 3.419769293922*^9}, {
   3.4265550571877866`*^9, 3.4265550579287863`*^9}, {3.4265560798137865`*^9, 
   3.4265560801037865`*^9}, {3.4265568567807865`*^9, 
   3.4265568637687864`*^9}, {3.4265569337687864`*^9, 3.426557018967787*^9}, {
   3.4280849051549997`*^9, 3.428084912672*^9}, {3.4280849476940002`*^9, 
   3.4280849504890003`*^9}, {3.432286145515625*^9, 3.432286146359375*^9}, {
   3.437985038765625*^9, 3.43798509209375*^9}, 3.437985326796875*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"GetVacuum", "[", 
   RowBox[{"ar_", "?", "ArrayQ"}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "b", "}"}], ",", 
    RowBox[{"Switch", "[", 
     RowBox[{
      RowBox[{"Length", "[", 
       RowBox[{"Dimensions", "[", "ar", "]"}], "]"}], ",", "3", ",", 
      RowBox[{"Transpose", "[", 
       RowBox[{
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            FractionBox[
             RowBox[{"node", "/.", 
              RowBox[{"b_", "\[RuleDelayed]", 
               RowBox[{"BitAnd", "[", 
                RowBox[{"b", ",", "8"}], "]"}]}]}], "8"]}], ")"}], "#"}], 
         "&"}], "/@", 
        RowBox[{"Transpose", "[", "ar", "]"}]}], "]"}], ",", "2", ",", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", 
         FractionBox[
          RowBox[{"node", "/.", 
           RowBox[{"b_", "\[RuleDelayed]", 
            RowBox[{"BitAnd", "[", 
             RowBox[{"b", ",", "8"}], "]"}]}]}], "8"]}], ")"}], "ar"}], ",", 
      "_", ",", "$Failed"}], "]"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.436525074859375*^9, 3.436525090609375*^9}, {
  3.43798509975*^9, 3.43798512984375*^9}}],

Cell[BoxData[
 RowBox[{"<<", "ACPackages`Master`"}]], "Input",
 CellChangeTimes->{{3.4112381665959997`*^9, 3.4112381867460003`*^9}, 
   3.411238277582*^9}],

Cell[BoxData[
 RowBox[{"Remove", "[", "PrintInfo", "]"}]], "Input",
 CellChangeTimes->{{3.411238235457*^9, 3.411238243344*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"out", "=."}], ";", 
  RowBox[{"ReadBinarySnapFile", "[", 
   RowBox[{"\"\<velocity.snp\>\"", ",", "3", ",", "out", ",", 
    RowBox[{"PrintInfo", "\[Rule]", "Debug"}]}], "]"}], ";"}]], "Input",
 CellChangeTimes->{{3.435648378957375*^9, 3.43564840156675*^9}, {
  3.435662675176125*^9, 3.43566267581675*^9}, {3.435904557988625*^9, 
  3.435904558676125*^9}, {3.4379909120625*^9, 3.437990914640625*^9}, {
  3.463048216182*^9, 3.463048219733*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"1", ",", "1", ",", "1"}], "}"}]], "Print",
 CellChangeTimes->{3.4359045590355*^9, 3.43590989531675*^9, 
  3.437990915046875*^9, 3.4630482200109997`*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "5.0000400763`", ",", "76241", ",", "64", ",", "64", ",", "64", ",", 
   "100.`"}], "}"}]], "Print",
 CellChangeTimes->{3.4359045590355*^9, 3.43590989531675*^9, 
  3.437990915046875*^9, 3.463048220014*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Length of read from binary=\"\>", "\[InvisibleSpace]", 
   "1029000", "\[InvisibleSpace]", "\<\" and size of it=\"\>", 
   "\[InvisibleSpace]", "4116000", "\[InvisibleSpace]", "\<\" bytes\"\>"}],
  SequenceForm[
  "Length of read from binary=", 1029000, " and size of it=", 4116000, 
   " bytes"],
  Editable->False]], "Print",
 CellChangeTimes->{3.4359045590355*^9, 3.43590989531675*^9, 
  3.437990915046875*^9, 3.463048220017*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"ghost=\"\>", "\[InvisibleSpace]", "3"}],
  SequenceForm["ghost=", 3],
  Editable->False]], "Print",
 CellChangeTimes->{3.4359045590355*^9, 3.43590989531675*^9, 
  3.437990915046875*^9, 3.463048220046*^9}]
}, Open  ]]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"out", "=", 
   RowBox[{"ReadList", "[", "\"\<pumpflow.dmp\>\"", "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.43618281684375*^9, 3.4361828325625*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"out", "=."}], ";", 
  RowBox[{"ReadBinarySnapFile", "[", 
   RowBox[{"\"\<hartman_1_1034.snp\>\"", ",", "6", ",", "out", ",", 
    RowBox[{"PrintInfo", "\[Rule]", "Automatic"}]}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"coor", ",", "bounds", ",", "node"}], "}"}], "=", 
   RowBox[{"ReadAuxFiles", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"\"\<coord\>\"", ",", "\"\<node\>\""}], "}"}], ",", 
     RowBox[{"ShiftVector", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], ",", 
     RowBox[{"ProcDistrib", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"1", ",", "1", ",", "1"}], "}"}]}], ",", 
     RowBox[{"NumberOfRefs", "\[Rule]", "4"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", "bounds", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.41426573491*^9, 3.414265768815*^9}, {3.414265821932*^9, 
   3.4142658610950003`*^9}, {3.414266022685*^9, 3.414266059477*^9}, {
   3.414266168413*^9, 3.4142661690369997`*^9}, 3.4155116310699997`*^9, {
   3.4155118271470003`*^9, 3.4155118281800003`*^9}, {3.415522596466*^9, 
   3.415522597726*^9}, {3.415523060079*^9, 3.415523061079*^9}, {
   3.4155234460290003`*^9, 3.415523480166*^9}, 3.415527135475*^9, {
   3.415639688885*^9, 3.415639693382*^9}, 3.415640560664*^9, {
   3.4156406375179996`*^9, 3.415640638584*^9}, {3.4156974747051687`*^9, 
   3.415697484582156*^9}, 3.4156976547421703`*^9, {3.415697734835179*^9, 
   3.4156977351312084`*^9}, {3.4156979618448772`*^9, 3.415697974111104*^9}, 
   3.4156990289565783`*^9, {3.416284708302*^9, 3.416284712821*^9}, 
   3.4171663445439997`*^9, 3.417191577342*^9, {3.435648332848*^9, 
   3.43564833394175*^9}, {3.435663919019875*^9, 3.435663929457375*^9}, 
   3.435664699769875*^9, {3.435664739394875*^9, 3.435664764769875*^9}, {
   3.4359046305355*^9, 3.435904640582375*^9}, 3.435909266098*^9, {
   3.437994588328125*^9, 3.43799458878125*^9}, {3.438948991203125*^9, 
   3.4389490308125*^9}, {3.444734945375*^9, 3.44473496590625*^9}, {
   3.454743099359375*^9, 3.45474312265625*^9}, {3.45474615425*^9, 
   3.454746154609375*^9}, {3.454820201609375*^9, 3.45482020215625*^9}, {
   3.45492105278125*^9, 3.45492105846875*^9}, {3.4549317573125*^9, 
   3.454931757796875*^9}, {3.454990959015625*^9, 3.454990959390625*^9}, {
   3.455000809796875*^9, 3.455000810484375*^9}, {3.455014872734375*^9, 
   3.455014873328125*^9}, {3.45524509515625*^9, 3.45524509584375*^9}, {
   3.45533933153125*^9, 3.455339332390625*^9}, {3.45535419721875*^9, 
   3.455354208015625*^9}, {3.455430723578125*^9, 3.45543074090625*^9}, {
   3.4592382679375*^9, 3.459238272984375*^9}, {3.459245950390625*^9, 
   3.459245956609375*^9}, {3.459484782171875*^9, 3.459484792875*^9}, {
   3.4619993324375*^9, 3.461999349109375*^9}, {3.4620865236875*^9, 
   3.46208652753125*^9}, 3.46208663253125*^9, {3.46216983525*^9, 
   3.462169837375*^9}, {3.46366266309375*^9, 3.463662667796875*^9}, {
   3.4636631943125*^9, 3.463663195453125*^9}, 3.4637023208125*^9, {
   3.4659812520255003`*^9, 3.4659812523067503`*^9}, {3.4659825520098753`*^9, 
   3.4659825576817503`*^9}, {3.4661287795411253`*^9, 
   3.4661288015411253`*^9}, {3.4661290808536253`*^9, 
   3.4661290844786253`*^9}, {3.4661356237911253`*^9, 
   3.4661356258067503`*^9}, {3.4661391865567503`*^9, 
   3.4661391999786253`*^9}, {3.4661410572598753`*^9, 
   3.4661410639630003`*^9}, {3.4661545207130003`*^9, 
   3.4661545217911253`*^9}, {3.4664169575100927`*^9, 
   3.4664169589632177`*^9}, {3.478829969972212*^9, 3.478829979861212*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"1", ",", "1", ",", "1"}], "}"}]], "Print",
 CellChangeTimes->{3.478829980378212*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "100.0398971007`", ",", "1034", ",", "32", ",", "12", ",", "32", ",", 
   "1.`"}], "}"}]], "Print",
 CellChangeTimes->{3.478829980380212*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"ghost=\"\>", "\[InvisibleSpace]", "3"}],
  SequenceForm["ghost=", 3],
  Editable->False]], "Print",
 CellChangeTimes->{3.4788299808492117`*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"-", "2.`"}], ",", "2.`"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0.`", ",", "6.2829999999999995`"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"-", "2.`"}], ",", "2.`"}], "}"}]}], "}"}]], "Print",
 CellChangeTimes->{3.478829982864212*^9}]
}, Open  ]]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"coor", ",", "bounds", ",", "node"}], "}"}], "=", 
   RowBox[{"ReadAuxFiles", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"\"\<coord\>\"", ",", "\"\<node\>\""}], "}"}], ",", 
     RowBox[{"ShiftVector", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], ",", 
     RowBox[{"ProcDistrib", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"2", ",", "8", ",", "2"}], "}"}]}], ",", 
     RowBox[{"NumberOfRefs", "\[Rule]", "4"}]}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{3.4665102418168*^9}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"out", "=."}], ";", 
  RowBox[{"ReadBinarySnapFile", "[", 
   RowBox[{"\"\<screw_32_7950.snp\>\"", ",", "6", ",", "out", ",", 
    RowBox[{"PrintInfo", "\[Rule]", "Automatic"}]}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"coor", ",", "bounds", ",", "node"}], "}"}], "=", 
   RowBox[{"ReadAuxFiles", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"\"\<coord\>\"", ",", "\"\<node\>\""}], "}"}], ",", 
     RowBox[{"ShiftVector", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"10", ",", "0", ",", "0"}], "}"}]}], ",", 
     RowBox[{"ProcDistrib", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"2", ",", "8", ",", "2"}], "}"}]}], ",", 
     RowBox[{"NumberOfRefs", "\[Rule]", "4"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", "bounds", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.41426573491*^9, 3.414265768815*^9}, {3.414265821932*^9, 
   3.4142658610950003`*^9}, {3.414266022685*^9, 3.414266059477*^9}, {
   3.414266168413*^9, 3.4142661690369997`*^9}, 3.4155116310699997`*^9, {
   3.4155118271470003`*^9, 3.4155118281800003`*^9}, {3.415522596466*^9, 
   3.415522597726*^9}, {3.415523060079*^9, 3.415523061079*^9}, {
   3.4155234460290003`*^9, 3.415523480166*^9}, 3.415527135475*^9, {
   3.415639688885*^9, 3.415639693382*^9}, 3.415640560664*^9, {
   3.4156406375179996`*^9, 3.415640638584*^9}, {3.4156974747051687`*^9, 
   3.415697484582156*^9}, 3.4156976547421703`*^9, {3.415697734835179*^9, 
   3.4156977351312084`*^9}, {3.4156979618448772`*^9, 3.415697974111104*^9}, 
   3.4156990289565783`*^9, {3.416284708302*^9, 3.416284712821*^9}, 
   3.4171663445439997`*^9, 3.417191577342*^9, {3.435648332848*^9, 
   3.43564833394175*^9}, {3.435663919019875*^9, 3.435663929457375*^9}, 
   3.435664699769875*^9, {3.435664739394875*^9, 3.435664764769875*^9}, {
   3.4359046305355*^9, 3.435904640582375*^9}, 3.435909266098*^9, {
   3.437994588328125*^9, 3.43799458878125*^9}, {3.438948991203125*^9, 
   3.4389490308125*^9}, {3.444734945375*^9, 3.44473496590625*^9}, {
   3.454743099359375*^9, 3.45474312265625*^9}, {3.45474615425*^9, 
   3.454746154609375*^9}, {3.454820201609375*^9, 3.45482020215625*^9}, {
   3.45492105278125*^9, 3.45492105846875*^9}, {3.4549317573125*^9, 
   3.454931757796875*^9}, {3.454990959015625*^9, 3.454990959390625*^9}, {
   3.455000809796875*^9, 3.455000810484375*^9}, {3.455014872734375*^9, 
   3.455014873328125*^9}, {3.45524509515625*^9, 3.45524509584375*^9}, {
   3.45533933153125*^9, 3.455339332390625*^9}, {3.45535419721875*^9, 
   3.455354208015625*^9}, {3.455430723578125*^9, 3.45543074090625*^9}, {
   3.4592382679375*^9, 3.459238272984375*^9}, {3.459245950390625*^9, 
   3.459245956609375*^9}, {3.459484782171875*^9, 3.459484792875*^9}, {
   3.4619993324375*^9, 3.461999349109375*^9}, {3.4620865236875*^9, 
   3.46208652753125*^9}, 3.46208663253125*^9, {3.46216983525*^9, 
   3.462169837375*^9}, {3.46366266309375*^9, 3.463662667796875*^9}, {
   3.4636631943125*^9, 3.463663195453125*^9}, 3.4637023208125*^9, {
   3.4659812520255003`*^9, 3.4659812523067503`*^9}, {3.4659825520098753`*^9, 
   3.4659825576817503`*^9}, {3.4661287795411253`*^9, 
   3.4661288015411253`*^9}, {3.4661290808536253`*^9, 
   3.4661290844786253`*^9}, {3.4661356237911253`*^9, 
   3.4661356258067503`*^9}, {3.4661391865567503`*^9, 
   3.4661391999786253`*^9}, {3.4664160881819677`*^9, 
   3.4664160896507177`*^9}, {3.4664169695569677`*^9, 
   3.4664169715413427`*^9}, {3.4664178830413427`*^9, 
   3.4664178842757177`*^9}, {3.4664181377600927`*^9, 
   3.4664181406350927`*^9}, {3.4664185727913427`*^9, 
   3.4664185745413427`*^9}, {3.4665097400018*^9, 3.4665097524128*^9}, {
   3.4665101462658*^9, 3.4665101662827997`*^9}, {3.4668375271568003`*^9, 
   3.4668375276698*^9}, 3.4668376465467997`*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"2", ",", "8", ",", "2"}], "}"}]], "Print",
 CellChangeTimes->{
  3.463662712671875*^9, 3.46366319628125*^9, 3.463702321421875*^9, 
   3.463702434671875*^9, 3.4659812547911253`*^9, 3.4659825581817503`*^9, 
   3.4661288031973753`*^9, 3.4661290850255003`*^9, 3.4661356265723753`*^9, 
   3.4661392015411253`*^9, 3.4664160903694677`*^9, 3.4664169718382177`*^9, 
   3.4664178848225927`*^9, 3.4664181438225927`*^9, 3.4664185752757177`*^9, {
   3.4665097429178*^9, 3.4665097527578*^9}, 3.4665101479508*^9, 
   3.4668375287468*^9, 3.4668376496048*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "1.0000360881`", ",", "7950", ",", "64", ",", "64", ",", "64", ",", 
   "500.`"}], "}"}]], "Print",
 CellChangeTimes->{
  3.463662712671875*^9, 3.46366319628125*^9, 3.463702321421875*^9, 
   3.463702434671875*^9, 3.4659812547911253`*^9, 3.4659825581817503`*^9, 
   3.4661288031973753`*^9, 3.4661290850255003`*^9, 3.4661356265723753`*^9, 
   3.4661392015411253`*^9, 3.4664160903694677`*^9, 3.4664169718382177`*^9, 
   3.4664178848225927`*^9, 3.4664181438225927`*^9, 3.4664185752757177`*^9, {
   3.4665097429178*^9, 3.4665097527578*^9}, 3.4665101479508*^9, 
   3.4668375287468*^9, 3.4668376496448*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"ghost=\"\>", "\[InvisibleSpace]", "3"}],
  SequenceForm["ghost=", 3],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.463662712671875*^9, 3.46366319628125*^9, 3.463702321421875*^9, 
   3.463702434671875*^9, 3.4659812547911253`*^9, 3.4659825581817503`*^9, 
   3.4661288031973753`*^9, 3.4661290850255003`*^9, 3.4661356265723753`*^9, 
   3.4661392015411253`*^9, 3.4664160903694677`*^9, 3.4664169718382177`*^9, 
   3.4664178848225927`*^9, 3.4664181438225927`*^9, 3.4664185752757177`*^9, {
   3.4665097429178*^9, 3.4665097527578*^9}, 3.4665101479508*^9, 
   3.4668375287468*^9, 3.4668376496998*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"8.`", ",", "12.`"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0.`", ",", "6.283`"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"-", "2.`"}], ",", "2.`"}], "}"}]}], "}"}]], "Print",
 CellChangeTimes->{
  3.463662712671875*^9, 3.46366319628125*^9, 3.463702321421875*^9, 
   3.463702434671875*^9, 3.4659812547911253`*^9, 3.4659825581817503`*^9, 
   3.4661288031973753`*^9, 3.4661290850255003`*^9, 3.4661356265723753`*^9, 
   3.4661392015411253`*^9, 3.4664160903694677`*^9, 3.4664169718382177`*^9, 
   3.4664178848225927`*^9, 3.4664181438225927`*^9, 3.4664185752757177`*^9, {
   3.4665097429178*^9, 3.4665097527578*^9}, 3.4665101479508*^9, 
   3.4668375287468*^9, 3.4668376924258003`*^9}]
}, Open  ]]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{"If", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"Length", "[", "out", "]"}], ">", "6"}], ",", 
    RowBox[{"out", "=", 
     RowBox[{"Take", "[", 
      RowBox[{"out", ",", 
       RowBox[{"{", 
        RowBox[{"2", ",", 
         RowBox[{"-", "2"}]}], "}"}]}], "]"}]}]}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"If", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"Length", "[", "out", "]"}], ">", "7"}], ",", 
    RowBox[{"out", "=", 
     RowBox[{"Take", "[", 
      RowBox[{"out", ",", 
       RowBox[{"{", 
        RowBox[{"1", ",", 
         RowBox[{"-", "2"}]}], "}"}]}], "]"}]}]}], "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.414266143131*^9, 3.41426615226*^9}, {3.415523070854*^9, 
  3.415523078217*^9}, {3.445687498328125*^9, 3.4456874985*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"out", "=."}], ";", 
   RowBox[{"ReadBinarySnapFiles", "[", 
    RowBox[{"\"\<screw\>\"", ",", "\"\<.bak\>\"", ",", "8", ",", "out", ",", 
     RowBox[{"PrintInfo", "\[Rule]", "None"}]}], "]"}], ";"}], 
  "\[IndentingNewLine]", 
  RowBox[{"(*", 
   RowBox[{
    RowBox[{
     RowBox[{"{", 
      RowBox[{"vx", ",", "vy", ",", "vz", ",", "Ax", ",", "Ay", ",", "Az"}], 
      "}"}], "=", "out"}], ";"}], "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"coor", ",", "bounds", ",", "node"}], "}"}], "=", 
   RowBox[{"ReadAuxFiles", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"\"\<coord\>\"", ",", "\"\<node\>\""}], "}"}], ",", 
     RowBox[{"ShiftVector", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], ",", 
     RowBox[{"ProcDistrib", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"2", ",", "4", ",", "2"}], "}"}]}], ",", 
     RowBox[{"NumberOfRefs", "\[Rule]", "4"}]}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{
  3.3958229633269997`*^9, {3.395826012692*^9, 3.3958260170959997`*^9}, 
   3.395826502233*^9, {3.3958468811809998`*^9, 3.395846889237*^9}, 
   3.3958618729890003`*^9, {3.395901300766*^9, 3.395901301396*^9}, 
   3.3959991159609976`*^9, {3.3960005282909975`*^9, 3.3960005334929976`*^9}, {
   3.3960008018889976`*^9, 3.3960008029029975`*^9}, 3.3960373996242*^9, 
   3.40852401345*^9, 3.408524297481*^9, 3.408637541513*^9, {3.408637583424*^9,
    3.4086376192469997`*^9}, 3.408637941763*^9, {3.408637998343*^9, 
   3.408638081234*^9}, {3.409340444568*^9, 3.40934049973*^9}, {
   3.409340928177*^9, 3.409340928773*^9}, {3.409396188034148*^9, 
   3.409396205805148*^9}, {3.4094192542209997`*^9, 3.4094192547209997`*^9}, {
   3.4094988255179996`*^9, 3.40949882624*^9}, {3.4094989136470003`*^9, 
   3.409498925686*^9}, {3.409499182051*^9, 3.409499182633*^9}, {
   3.409499308882*^9, 3.409499309168*^9}, {3.409499480454*^9, 
   3.409499481684*^9}, 3.409499947123*^9, {3.4094999789119997`*^9, 
   3.409499979733*^9}, 3.409501928571*^9, {3.409516067861*^9, 
   3.4095160778129997`*^9}, {3.409516451354*^9, 3.409516451715*^9}, {
   3.409516703262*^9, 3.409516706584*^9}, 3.409516842224*^9, {
   3.409564756895*^9, 3.409564758946*^9}, 3.4095653486879997`*^9, {
   3.409596385125*^9, 3.409596385579*^9}, {3.409596475139*^9, 
   3.409596489875*^9}, {3.411195982716*^9, 3.411195987678*^9}, {
   3.411238203781*^9, 3.411238204297*^9}, {3.411238490307*^9, 
   3.411238557343*^9}, {3.41127866735*^9, 3.4112786803199997`*^9}, {
   3.4113749302939997`*^9, 3.411374931347*^9}, {3.411725758337*^9, 
   3.411725759532*^9}, {3.4117258087*^9, 3.411725850289*^9}, {
   3.411730728249*^9, 3.411730728709*^9}, {3.411817051016*^9, 
   3.411817054836*^9}, {3.411827883051*^9, 3.411827884745*^9}, {
   3.411828078499*^9, 3.411828079362*^9}, {3.4118704372790003`*^9, 
   3.411870438561*^9}, {3.41189355941*^9, 3.411893560683*^9}, {
   3.411893610547*^9, 3.4118936557860003`*^9}, {3.41189370754*^9, 
   3.411893730101*^9}, {3.411912742674*^9, 3.411912756288*^9}, {
   3.411919169024*^9, 3.411919169808*^9}, {3.4119202773529997`*^9, 
   3.411920278182*^9}, {3.412321449816*^9, 3.412321450729*^9}, {
   3.4123214935959997`*^9, 3.412321494237*^9}, {3.4123413208929996`*^9, 
   3.412341331156*^9}, {3.412343097836*^9, 3.412343099115*^9}, {
   3.4123432031210003`*^9, 3.412343203895*^9}, {3.412343249093*^9, 
   3.412343307701*^9}, {3.4123433389630003`*^9, 3.412343340267*^9}, {
   3.412357715349*^9, 3.4123577162320004`*^9}, {3.412357777869*^9, 
   3.4123577790950003`*^9}, {3.412357823365*^9, 3.41235782462*^9}, {
   3.414266331573*^9, 3.414266331718*^9}, {3.4143934630290003`*^9, 
   3.414393468436*^9}, {3.4143973650101748`*^9, 3.4143973655373325`*^9}, {
   3.414397406617653*^9, 3.4143974070467815`*^9}, {3.4143974671167974`*^9, 
   3.414397500789896*^9}, {3.415697718032499*^9, 3.415697730114707*^9}, {
   3.416155743726*^9, 3.416155763676*^9}, {3.416155915086*^9, 
   3.416155915844*^9}, {3.416156048495*^9, 3.416156049877*^9}, {
   3.4161561540369997`*^9, 3.4161561567279997`*^9}, {3.4162842748199997`*^9, 
   3.416284275553*^9}, {3.4162847007860003`*^9, 3.4162847012320004`*^9}, {
   3.4162852476280003`*^9, 3.416285248821*^9}, {3.416553813267*^9, 
   3.416553814083*^9}, {3.416553848141*^9, 3.4165538486870003`*^9}, {
   3.416554036659*^9, 3.4165540371870003`*^9}, {3.416580031611*^9, 
   3.416580041035*^9}, {3.41663740996*^9, 3.4166374256429996`*^9}, {
   3.416637597606*^9, 3.416637598262*^9}, {3.4166381453129997`*^9, 
   3.416638145711*^9}, {3.416638232667*^9, 3.416638233039*^9}, {
   3.416640127451*^9, 3.416640128369*^9}, {3.416736482223*^9, 
   3.4167364833199997`*^9}, {3.41676546635016*^9, 3.41676549741716*^9}, {
   3.4167655373741603`*^9, 3.4167655378351603`*^9}, {3.4167655989371605`*^9, 
   3.41676559960716*^9}, {3.41676563637916*^9, 3.41676563700116*^9}, {
   3.41676566922616*^9, 3.4167656718221602`*^9}, {3.41676572624716*^9, 
   3.41676572690316*^9}, {3.41676575938216*^9, 3.4167657600621605`*^9}, {
   3.41676581036916*^9, 3.41676581094116*^9}, {3.41676593008416*^9, 
   3.4167659305641603`*^9}, {3.4167659718121605`*^9, 3.41676597297616*^9}, {
   3.4168106911949997`*^9, 3.416810702428*^9}, {3.4168107760109997`*^9, 
   3.416810778035*^9}, {3.416810812355*^9, 3.416810841692*^9}, {
   3.41681087552*^9, 3.416810876994*^9}, {3.416810980635*^9, 
   3.416810993734*^9}, {3.416811066749*^9, 3.416811067576*^9}, {
   3.416811182256*^9, 3.416811183019*^9}, {3.416811241031*^9, 
   3.4168112418640003`*^9}, {3.4168114752390003`*^9, 3.416811476094*^9}, {
   3.416811642447*^9, 3.416811643802*^9}, {3.416812105566*^9, 
   3.4168121072130003`*^9}, {3.416813493632*^9, 3.416813502316*^9}, {
   3.416813537097*^9, 3.4168135380030003`*^9}, {3.416813576672*^9, 
   3.416813577413*^9}, {3.416813621566*^9, 3.41681362404*^9}, {
   3.4168138778059998`*^9, 3.416813881094*^9}, {3.416818273479*^9, 
   3.4168182749440002`*^9}, {3.416818365686*^9, 3.416818366318*^9}, {
   3.4168184082139997`*^9, 3.416818409023*^9}, {3.416818439241*^9, 
   3.416818466775*^9}, {3.416819856892*^9, 3.416819866748*^9}, {
   3.416819910514*^9, 3.4168199694820004`*^9}, {3.416822847197*^9, 
   3.416822854955*^9}, {3.4168228945360003`*^9, 3.416822895475*^9}, {
   3.416823569837*^9, 3.41682357052*^9}, {3.4168236290439997`*^9, 
   3.416823629729*^9}, {3.416823686347*^9, 3.416823687705*^9}, {
   3.4168237442939997`*^9, 3.416823745499*^9}, {3.416823991722*^9, 
   3.416823992675*^9}, {3.4168240302650003`*^9, 3.416824030535*^9}, {
   3.41682408305*^9, 3.416824085224*^9}, {3.416824180921*^9, 
   3.416824181651*^9}, {3.4168242341140003`*^9, 3.4168242347860003`*^9}, {
   3.416824319296*^9, 3.416824321217*^9}, {3.416824355943*^9, 
   3.416824386436*^9}, {3.416824442625*^9, 3.4168244491140003`*^9}, {
   3.41682463695*^9, 3.416824639415*^9}, {3.416893119307*^9, 
   3.416893120509*^9}, {3.416893248674*^9, 3.416893253026*^9}, {
   3.4171555927279997`*^9, 3.4171555996029997`*^9}, {3.41715683559*^9, 
   3.417156836789*^9}, {3.417156923547*^9, 3.417156925108*^9}, 
   3.41715821452*^9, {3.417158477416*^9, 3.417158490424*^9}, {
   3.417187883742*^9, 3.4171878917609997`*^9}, {3.417188251557*^9, 
   3.417188252566*^9}, {3.417188661119*^9, 3.4171886619519997`*^9}, {
   3.435903882301125*^9, 3.435903895301125*^9}, {3.435903925769875*^9, 
   3.43590392750425*^9}, {3.4359041205355*^9, 3.435904121223*^9}, {
   3.435904242973*^9, 3.435904243738625*^9}, {3.43591020325425*^9, 
   3.4359102159105*^9}, 3.43591079694175*^9, {3.435910913519875*^9, 
   3.435910915363625*^9}, 3.4359110579105*^9, {3.435911680973*^9, 
   3.4359116825355*^9}, {3.436252440203125*^9, 3.4362524655*^9}, 
   3.4362526785625*^9, {3.4365245316875*^9, 3.4365245325625*^9}, {
   3.436524618390625*^9, 3.436524624796875*^9}, {3.436525133046875*^9, 
   3.43652514884375*^9}, 3.436525183828125*^9, 3.436525249515625*^9, {
   3.436525848515625*^9, 3.4365259325*^9}, 3.43652603065625*^9, {
   3.43652631075*^9, 3.436526381953125*^9}, {3.43677240191751*^9, 
   3.4367724058236103`*^9}, {3.437814073375*^9, 3.4378140859375*^9}, {
   3.43781424415625*^9, 3.43781424446875*^9}, {3.437894481828125*^9, 
   3.437894499578125*^9}, {3.437895440625*^9, 3.437895443859375*^9}, {
   3.437900284109375*^9, 3.43790029090625*^9}, {3.43798133303125*^9, 
   3.43798134403125*^9}, {3.437983423109375*^9, 3.43798342365625*^9}, {
   3.437983595515625*^9, 3.43798359615625*^9}, {3.437984188609375*^9, 
   3.437984195765625*^9}, {3.437988437359375*^9, 3.437988437609375*^9}, 
   3.437988861984375*^9, {3.437989916828125*^9, 3.437989916921875*^9}, {
   3.437990415703125*^9, 3.43799041603125*^9}, {3.4379925455625*^9, 
   3.437992545703125*^9}, {3.437992632875*^9, 3.4379926335*^9}, {
   3.4379930540625*^9, 3.43799305509375*^9}, {3.437994603078125*^9, 
   3.437994618421875*^9}, {3.43799810975*^9, 3.437998111453125*^9}, {
   3.43806785709375*^9, 3.438067859171875*^9}, {3.438591798515625*^9, 
   3.43859181840625*^9}, {3.43859233709375*^9, 3.438592349515625*^9}, {
   3.438593346484375*^9, 3.43859335021875*^9}, {3.43859431771875*^9, 
   3.4385943183125*^9}, {3.438598043453125*^9, 3.43859807046875*^9}, {
   3.438598265765625*^9, 3.438598270921875*^9}, {3.43860313071875*^9, 
   3.438603136140625*^9}, {3.438671576875*^9, 3.438671577625*^9}, {
   3.438928477453125*^9, 3.43892847821875*^9}, {3.4389403558125*^9, 
   3.43894036709375*^9}, {3.43894145128125*^9, 3.438941451875*^9}, {
   3.438948653640625*^9, 3.43894865371875*^9}, {3.4390147645625*^9, 
   3.43901476509375*^9}, {3.4390170179375*^9, 3.439017018265625*^9}, {
   3.439023776515625*^9, 3.439023776640625*^9}, {3.444726546765625*^9, 
   3.444726570421875*^9}, {3.4447341341875*^9, 3.44473413525*^9}, {
   3.445241969875*^9, 3.445241972265625*^9}, {3.445250719625*^9, 
   3.4452507201875*^9}, {3.445320366265625*^9, 3.4453203674375*^9}, {
   3.44533985584375*^9, 3.4453398565*^9}, {3.445668890375*^9, 
   3.445668897359375*^9}, {3.454745372640625*^9, 3.45474538225*^9}, 
   3.45543890765625*^9, 3.459233848671875*^9, {3.462600538390625*^9, 
   3.46260056571875*^9}, {3.46260067628125*^9, 3.4626006773125*^9}, {
   3.4626008784375*^9, 3.462600882453125*^9}, {3.46260133596875*^9, 
   3.46260133671875*^9}, {3.46287043058*^9, 3.4628704482200003`*^9}, {
   3.462870752825*^9, 3.462870761175*^9}, {3.463040697774*^9, 
   3.463040707619*^9}, {3.463041397541*^9, 3.4630413981470003`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"ArrayPlot", "[", 
    SuperscriptBox[
     RowBox[{"#", "[", 
      RowBox[{"[", 
       RowBox[{"All", ",", "5"}], "]"}], "]"}], "\[Transpose]"], "]"}], "&"}],
   "/@", "out"}]], "Input",
 CellChangeTimes->{{3.436524580234375*^9, 3.4365245948125*^9}, 
   3.436524638359375*^9, {3.436524731765625*^9, 3.436524736734375*^9}, {
   3.436524906921875*^9, 3.436524913140625*^9}, {3.4365250385625*^9, 
   3.436525042109375*^9}, {3.43652509584375*^9, 3.43652515865625*^9}, {
   3.436525197421875*^9, 3.436525239515625*^9}, {3.43781426434375*^9, 
   3.437814264875*^9}, {3.4389404441875*^9, 3.43894044540625*^9}, {
   3.4664169830882177`*^9, 3.4664169867288427`*^9}}],

Cell[BoxData[
 RowBox[{"ArrayPlot", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"out", "[", 
     RowBox[{"[", 
      RowBox[{"4", ",", "All", ",", "5"}], "]"}], "]"}], "/.", 
    RowBox[{"{", 
     RowBox[{"0.", "\[Rule]", "0"}], "}"}]}], ",", 
   RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.436524827140625*^9, 3.43652489634375*^9}, {
  3.4365254174375*^9, 3.43652544671875*^9}, {3.436526077859375*^9, 
  3.43652612840625*^9}, {3.436526404875*^9, 3.43652646015625*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}], "=", 
   RowBox[{"rotc", "[", 
    RowBox[{"Ax", ",", "Ay", ",", "Az", ",", "3"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.436245340127*^9, 3.43624534921*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}], "=", 
   RowBox[{"rotc", "[", 
    RowBox[{
     RowBox[{"Sequence", "@@", 
      RowBox[{"Take", "[", 
       RowBox[{"out", ",", 
        RowBox[{"-", "3"}]}], "]"}]}], ",", "3"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
    RowBox[{
     RowBox[{"{", 
      RowBox[{"jx", ",", "jy", ",", "jz"}], "}"}], "=", 
     RowBox[{"rotc", "[", 
      RowBox[{"Bx", ",", "By", ",", "Bz", ",", "3"}], "]"}]}], ";"}], 
   "*)"}]}]}], "Input",
 CellChangeTimes->{{3.396031269856*^9, 3.396031270641*^9}, {
   3.4094991425889997`*^9, 3.40949915275*^9}, {3.409499284632*^9, 
   3.409499289375*^9}, {3.4095964979370003`*^9, 3.409596498314*^9}, {
   3.437814328609375*^9, 3.43781432996875*^9}, 3.445340075078125*^9, {
   3.4665101867298*^9, 3.4665101868538*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{
    "p", ",", "vx", ",", "vy", ",", "vz", ",", "Ax", ",", "Ay", ",", "Az", 
     ",", "nut"}], "}"}], "=", 
   RowBox[{"ReadTextSnapFile", "[", 
    RowBox[{"\"\<pumpflow_1_0.snp\>\"", ",", "8", ",", 
     RowBox[{"PrintInfo", "\[Rule]", "Automatic"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"coor", ",", "bounds", ",", "node"}], "}"}], "=", 
   RowBox[{"ReadAuxFiles", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"\"\<coord\>\"", ",", "\"\<node\>\""}], "}"}], ",", 
     RowBox[{"ShiftVector", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], ",", 
     RowBox[{"ProcDistrib", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"1", ",", "1", ",", "1"}], "}"}]}], ",", 
     RowBox[{"NumberOfRefs", "\[Rule]", "4"}]}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.436182974953125*^9, 3.436182994828125*^9}, {
   3.43618302715625*^9, 3.436183036125*^9}, {3.43618312384375*^9, 
   3.436183150453125*^9}, {3.436183331078125*^9, 3.436183332109375*^9}, 
   3.436244783602*^9, {3.4362453259049997`*^9, 3.4362453265480003`*^9}, 
   3.43624590940625*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"1", ",", "1", ",", "1"}], "}"}]], "Print",
 CellChangeTimes->{
  3.436183037515625*^9, {3.4361831416875*^9, 3.436183151421875*^9}, 
   3.4361833329375*^9, 3.436183390421875*^9, {3.4362021529040003`*^9, 
   3.4362021661359997`*^9}, 3.436203619123*^9, 3.436244786907*^9, 
   3.436245330285*^9, 3.43624591059375*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"0.`", ",", "0", ",", "32", ",", "32", ",", "32", ",", "10.`"}], 
  "}"}]], "Print",
 CellChangeTimes->{
  3.436183037515625*^9, {3.4361831416875*^9, 3.436183151421875*^9}, 
   3.4361833329375*^9, 3.436183390421875*^9, {3.4362021529040003`*^9, 
   3.4362021661359997`*^9}, 3.436203619123*^9, 3.436244786907*^9, 
   3.436245330285*^9, 3.436245910609375*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"ghost=\"\>", "\[InvisibleSpace]", "3"}],
  SequenceForm["ghost=", 3],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.436183037515625*^9, {3.4361831416875*^9, 3.436183151421875*^9}, 
   3.4361833329375*^9, 3.436183390421875*^9, {3.4362021529040003`*^9, 
   3.4362021661359997`*^9}, 3.436203619123*^9, 3.436244786907*^9, 
   3.436245330285*^9, 3.436245910734375*^9}]
}, Open  ]]
}, Open  ]],

Cell[BoxData[
 RowBox[{"Max", "/@", 
  RowBox[{"Abs", "/@", 
   RowBox[{"{", 
    RowBox[{
    "p", ",", "vx", ",", "vy", ",", "vz", ",", "Ax", ",", "Ay", ",", "Az", 
     ",", "nut"}], "}"}]}]}]], "Input",
 CellChangeTimes->{{3.435648466598*^9, 3.435648470394875*^9}, 
   3.43618333990625*^9, 3.43624479798*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"out", "=."}], ";", 
  RowBox[{"ReadBinarySnapFile", "[", 
   RowBox[{"\"\<velocity.snp\>\"", ",", "4", ",", "out", ",", 
    RowBox[{"PrintInfo", "\[Rule]", "None"}]}], "]"}], ";"}]], "Input",
 CellChangeTimes->{{3.435649212551125*^9, 3.43564922719175*^9}, {
   3.435649289332375*^9, 3.43564931231675*^9}, 3.459238803421875*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Max", "[", 
    RowBox[{"Abs", "[", 
     RowBox[{"Flatten", "[", "#", "]"}], "]"}], "]"}], "&"}], "/@", 
  "out"}]], "Input",
 CellChangeTimes->{{3.41715688917*^9, 3.417156901984*^9}, {
  3.435556427613625*^9, 3.43555643719175*^9}, {3.4452420278125*^9, 
  3.445242031984375*^9}, {3.44568801846875*^9, 3.44568803196875*^9}, {
  3.454746293375*^9, 3.4547462939375*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "0.26732337474823`", ",", "0.3113105893135071`", ",", "0.2601781189441681`",
    ",", "0.14928889274597168`", ",", "0.04669889062643051`", ",", 
   "0.1445508450269699`"}], "}"}]], "Output",
 CellChangeTimes->{3.462086590109375*^9, 3.462086681328125*^9, 
  3.462169865203125*^9, 3.463663169625*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{
   SqrtBox[
    RowBox[{"Mean", "[", 
     RowBox[{"Flatten", "[", 
      SuperscriptBox["#", "2"], "]"}], "]"}]], "&"}], "/@", "out"}]], "Input",
 CellChangeTimes->{{3.41715688917*^9, 3.417156901984*^9}, {
  3.435556427613625*^9, 3.43555643719175*^9}, {3.444534390209*^9, 
  3.444534399222*^9}}],

Cell[BoxData[
 RowBox[{"Max", "@", 
  RowBox[{"Abs", "@", 
   SqrtBox[
    RowBox[{"Total", "[", 
     SuperscriptBox[
      RowBox[{"Take", "[", 
       RowBox[{"out", ",", 
        RowBox[{"{", 
         RowBox[{"1", ",", "3"}], "}"}]}], "]"}], "2"], "]"}]]}]}]], "Input",
 CellChangeTimes->{{3.41241999889124*^9, 3.4124200186492157`*^9}, {
  3.4453385890775003`*^9, 3.4453385912875*^9}, {3.45492113203125*^9, 
  3.454921143359375*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"EstimateBoundary", "[", 
   RowBox[{"mat_", "?", "ArrayQ"}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"Ein", ",", "Eb", ",", 
      RowBox[{"ds", "=", 
       RowBox[{"Dimensions", "[", "mat", "]"}]}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", 
     RowBox[{
      RowBox[{"Ein", "=", 
       RowBox[{"Mean", "[", 
        RowBox[{"Flatten", "@", 
         SuperscriptBox[
          RowBox[{"mat", "\[LeftDoubleBracket]", 
           RowBox[{
            RowBox[{"2", ";;", 
             RowBox[{"-", "2"}]}], ",", "All", ",", 
            RowBox[{"2", ";;", 
             RowBox[{"-", "2"}]}]}], "\[RightDoubleBracket]"}], "2"]}], 
        "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"Eb", "=", 
       SqrtBox[
        FractionBox[
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"Times", "@@", "ds"}], ")"}], " ", 
           RowBox[{"Mean", "[", 
            RowBox[{"Flatten", "@", 
             SuperscriptBox["mat", "2"]}], "]"}]}], "-", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"Times", "@@", 
             RowBox[{"(", 
              RowBox[{"ds", "-", "2"}], ")"}]}], ")"}], "Ein"}]}], 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"Times", "@@", "ds"}], ")"}], "-", 
          RowBox[{"(", 
           RowBox[{"Times", "@@", 
            RowBox[{"(", 
             RowBox[{"ds", "-", "2"}], ")"}]}], ")"}]}]]]}], ";", 
      "\[IndentingNewLine]", 
      FractionBox["Eb", 
       RowBox[{"Max", "[", 
        RowBox[{"Flatten", "@", 
         RowBox[{"Abs", "@", "mat"}]}], "]"}]]}], "*)"}], 
    "\[IndentingNewLine]", 
    FractionBox[
     RowBox[{"Max", "@", 
      RowBox[{"Abs", "@", 
       RowBox[{"Flatten", "@", 
        RowBox[{"mat", "\[LeftDoubleBracket]", 
         RowBox[{
          RowBox[{"2", ";;", 
           RowBox[{"-", "2"}]}], ",", "All", ",", 
          RowBox[{"2", ";;", 
           RowBox[{"-", "2"}]}]}], "\[RightDoubleBracket]"}]}]}]}], 
     RowBox[{"Max", "@", 
      RowBox[{"Abs", "@", 
       RowBox[{"Complement", "[", 
        RowBox[{
         RowBox[{"Flatten", "@", "mat"}], ",", 
         RowBox[{"Flatten", "@", 
          RowBox[{"mat", "\[LeftDoubleBracket]", 
           RowBox[{
            RowBox[{"2", ";;", 
             RowBox[{"-", "2"}]}], ",", "All", ",", 
            RowBox[{"2", ";;", 
             RowBox[{"-", "2"}]}]}], "\[RightDoubleBracket]"}]}]}], 
        "]"}]}]}]]}], "\[IndentingNewLine]", "]"}]}]], "Input",
 CellChangeTimes->{{3.418313215024*^9, 3.418313230348*^9}, {
  3.4183133050039997`*^9, 3.41831353444*^9}, {3.41831371574*^9, 
  3.418313726586*^9}, {3.418321648123*^9, 3.418321772046*^9}, {
  3.4183218139779997`*^9, 3.4183218159630003`*^9}, {3.418321854078*^9, 
  3.418321859171*^9}}],

Cell[BoxData[
 RowBox[{"PrintRange", "[", 
  RowBox[{"WithoutFict", "@", 
   RowBox[{"Bx", "\[LeftDoubleBracket]", 
    RowBox[{"10", ",", "All", ",", "25"}], "\[RightDoubleBracket]"}]}], 
  "]"}]], "Input",
 CellChangeTimes->{{3.411725979295*^9, 3.4117260972939997`*^9}, {
  3.4118171587349997`*^9, 3.411817162085*^9}, {3.411817214425*^9, 
  3.4118172449370003`*^9}, {3.411920335148*^9, 3.411920342076*^9}, {
  3.414393475776*^9, 3.414393478315*^9}, {3.416811010764*^9, 
  3.4168110119890003`*^9}}],

Cell[BoxData[
 RowBox[{"PrintRange", "[", 
  RowBox[{"Take", "[", 
   RowBox[{
    RowBox[{"Abs", "@", 
     RowBox[{"Fourier", "@", 
      RowBox[{"WithoutFict", "@", 
       RowBox[{"Bx", "\[LeftDoubleBracket]", 
        RowBox[{"15", ",", "All", ",", "15"}], 
        "\[RightDoubleBracket]"}]}]}]}], ",", "10"}], "]"}], "]"}]], "Input",
 CellChangeTimes->{{3.411725979295*^9, 3.4117260972939997`*^9}, {
   3.4118171587349997`*^9, 3.411817162085*^9}, {3.411817214425*^9, 
   3.4118172173059998`*^9}, 3.411920357159*^9, {3.412357840481*^9, 
   3.412357851087*^9}, {3.4123579287790003`*^9, 3.412358017223*^9}, 
   3.4127017185290003`*^9, {3.414393483159*^9, 3.414393492243*^9}, {
   3.4167658143741603`*^9, 3.41676581548516*^9}}],

Cell[BoxData[
 RowBox[{"ReadDrawSection", "[", 
  RowBox[{"\"\<dynamo_2_12820.snp\>\"", ",", "Binary", ",", "8", ",", 
   RowBox[{"{", 
    RowBox[{"5", ",", "6", ",", "7"}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.3960293462939997`*^9, 3.396029430333*^9}, {
  3.3960297593120003`*^9, 3.3960297613380003`*^9}}],

Cell[BoxData[
 RowBox[{"DrawSection", "[", 
  RowBox[{"Sequence", "@@", 
   RowBox[{"ReadSection", "[", "4314", "]"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.396031311271*^9, 3.3960313435950003`*^9}, {
  3.4118280295299997`*^9, 3.4118280307720003`*^9}}],

Cell[BoxData[
 RowBox[{"Table", "[", 
  RowBox[{
   RowBox[{"ListPlot3D", "[", 
    RowBox[{
     RowBox[{"Cut3D", "[", 
      RowBox[{"Az", ",", "2", ",", "i"}], "]"}], ",", 
     RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}], ",", 
   RowBox[{"{", 
    RowBox[{"i", ",", "1", ",", 
     RowBox[{
      RowBox[{"Dimensions", "[", "By", "]"}], "[", 
      RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{3.395826514834*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"out1", "=", "out"}], ";"}]], "Input",
 CellChangeTimes->{{3.445687892421875*^9, 3.44568789359375*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Max", "[", 
    RowBox[{"Abs", "[", 
     RowBox[{"Flatten", "[", "#", "]"}], "]"}], "]"}], "&"}], "/@", 
  RowBox[{"(", 
   RowBox[{"out1", "-", "out"}], ")"}]}]], "Input",
 CellChangeTimes->{{3.417158219649*^9, 3.417158269566*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", 
   "0.`", ",", "0.`"}], "}"}]], "Output",
 CellChangeTimes->{{3.4171582246400003`*^9, 3.417158270184*^9}, 
   3.417158486698*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{
    "p2", ",", "vx2", ",", "vy2", ",", "vz2", ",", "Ax2", ",", "Ay2", ",", 
     "Az2", ",", "nut2", ",", "Axm2", ",", "Aym2", ",", "Azm2", ",", 
     "nutm2"}], "}"}], "=", 
   RowBox[{"{", 
    RowBox[{
    "p", ",", "vx", ",", "vy", ",", "vz", ",", "Ax", ",", "Ay", ",", "Az", 
     ",", "nut", ",", "Axm", ",", "Aym", ",", "Azm", ",", "nutm"}], "}"}]}], 
  ";"}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Max", "[", 
    RowBox[{"Abs", "[", "#", "]"}], "]"}], "&"}], "/@", 
  RowBox[{"(", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "p2", ",", "vx2", ",", "vy2", ",", "vz2", ",", "Ax2", ",", "Ay2", ",", 
      "Az2", ",", "nut2", ",", "Axm2", ",", "Aym2", ",", "Azm2", ",", 
      "nutm2"}], "}"}], "-", 
    RowBox[{"{", 
     RowBox[{
     "p1", ",", "vx1", ",", "vy1", ",", "vz1", ",", "Ax1", ",", "Ay1", ",", 
      "Az1", ",", "nut1", ",", "Axm1", ",", "Aym1", ",", "Azm1", ",", 
      "nutm1"}], "}"}]}], ")"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", 
   "0.`", ",", "0", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`"}], 
  "}"}]], "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"(", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
    "p2", ",", "vx2", ",", "vy2", ",", "vz2", ",", "Ax2", ",", "Ay2", ",", 
     "Az2", ",", "nut2", ",", "Axm2", ",", "Aym2", ",", "Azm2", ",", 
     "nutm2"}], "}"}], "==", 
   RowBox[{"{", 
    RowBox[{
    "p1", ",", "vx1", ",", "vy1", ",", "vz1", ",", "Ax1", ",", "Ay1", ",", 
     "Az1", ",", "nut1", ",", "Axm1", ",", "Aym1", ",", "Azm1", ",", 
     "nutm1"}], "}"}]}], ")"}]], "Input"],

Cell[BoxData["True"], "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Max", "/@", 
  RowBox[{"{", 
   RowBox[{"vx", ",", "vy", ",", "vz"}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "3.324333906173706`", ",", "0.9999961853027344`", ",", 
   "2.067089080810547`"}], "}"}]], "Output",
 CellChangeTimes->{3.395826547575*^9, 3.3959014607209997`*^9, 
  3.396025119483*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["\:041f\:043e\:0441\:0442\:0440\:043e\:0435\:043d\:0438\:0435 \:0442\
\:0440\:0451\:0445\:043c\:0435\:0440\:043d\:044b\:0445 \:0433\:0440\:0430\
\:0444\:0438\:043a\:043e\:0432", "Subsection",
 CellChangeTimes->{{3.4361827725625*^9, 3.43618277728125*^9}}],

Cell[BoxData[
 RowBox[{"ListPlot3D", "/@", 
  RowBox[{"Cut3D", "/@", 
   RowBox[{"Drop", "[", 
    RowBox[{"out", ",", "0"}], "]"}]}]}]], "Input",
 CellChangeTimes->{{3.4361829219375*^9, 3.43618293475*^9}, {
  3.4361830470625*^9, 3.4361830473125*^9}}],

Cell[BoxData[
 RowBox[{"Show2x", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"ListPlot3D", "[", 
     RowBox[{
      RowBox[{"Transpose", "[", 
       RowBox[{"Cut3D", "[", 
        RowBox[{"#", ",", "2", ",", "7"}], "]"}], "]"}], ",", 
      RowBox[{"PlotRange", "\[Rule]", "All"}], ",", 
      RowBox[{"DisplayFunction", "->", "Identity"}]}], "]"}], "&"}], ",", 
   "\[IndentingNewLine]", 
   RowBox[{"Take", "[", 
    RowBox[{"out", ",", "4"}], "]"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.409499330325*^9, 3.409499338832*^9}, {
   3.4095965087869997`*^9, 3.4095965163050003`*^9}, 3.417405351799*^9, {
   3.417405586032*^9, 3.417405587862*^9}, {3.4355210578059998`*^9, 
   3.435521058755*^9}, {3.435559668707375*^9, 3.435559671519875*^9}, {
   3.435648495473*^9, 3.435648496519875*^9}, 3.435648706676125*^9, 
   3.435663985426125*^9, 3.435901365832375*^9, 3.43591030181675*^9, 
   3.43799095934375*^9, {3.437997708296875*^9, 3.437997722265625*^9}, 
   3.43799812321875*^9, 3.438940526453125*^9, {3.438940650140625*^9, 
   3.438940663875*^9}, 3.44473473628125*^9, 3.444734791265625*^9, {
   3.44473484540625*^9, 3.444734860703125*^9}, {3.444736955609375*^9, 
   3.444736957265625*^9}, {3.445242041296875*^9, 3.445242042015625*^9}, {
   3.445688240734375*^9, 3.445688242359375*^9}}],

Cell[BoxData[
 RowBox[{"ListContourPlot", "[", 
  RowBox[{
   RowBox[{"WithoutFict", "@", 
    RowBox[{"out", "[", 
     RowBox[{"[", 
      RowBox[{"5", ",", "All", ",", "60"}], "]"}], "]"}]}], ",", 
   RowBox[{"ContourLabels", "\[Rule]", "True"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.438941552125*^9, 3.43894160575*^9}, {
  3.438941654765625*^9, 3.43894166053125*^9}, {3.43894171034375*^9, 
  3.43894174659375*^9}}],

Cell[BoxData[
 RowBox[{"ListContourPlot", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"out", "[", 
     RowBox[{"[", 
      RowBox[{"1", ",", "All", ",", "5"}], "]"}], "]"}], "/.", 
    RowBox[{"{", 
     RowBox[{"0.", "\[Rule]", "1"}], "}"}]}], ",", 
   RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.4452392736755424`*^9, 3.4452394798919425`*^9}, {
  3.4453289332789*^9, 3.4453289362918997`*^9}, {3.455438988640625*^9, 
  3.455438994109375*^9}}],

Cell[BoxData[
 RowBox[{"Show2x", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"ListPlot3D", "[", 
     RowBox[{
      RowBox[{"Transpose", "[", 
       RowBox[{"Cut3D", "[", 
        RowBox[{"#", ",", "2", ",", "4"}], "]"}], "]"}], ",", 
      RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}], "&"}], ",", 
   RowBox[{"{", 
    RowBox[{"Bx", ",", "By", ",", "Bz", ",", "vx"}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.4453349084875*^9, 3.4453349472535*^9}}],

Cell[BoxData[
 RowBox[{"Table", "[", 
  RowBox[{
   RowBox[{"ListPlot3D", "[", 
    RowBox[{
     RowBox[{"Transpose", "[", 
      RowBox[{"Cut3D", "[", 
       RowBox[{"Bz", ",", "2", ",", "i"}], "]"}], "]"}], ",", 
     RowBox[{"PlotRange", "\[Rule]", "All"}], ",", 
     RowBox[{"DisplayFunction", "->", "Identity"}]}], "]"}], ",", 
   RowBox[{"{", 
    RowBox[{"i", ",", "36"}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.4184441624849997`*^9, 3.4184441952*^9}}],

Cell[BoxData[
 RowBox[{"ListPlot3D", "[", 
  RowBox[{
   RowBox[{"Transpose", "[", 
    RowBox[{"Cut3D", "[", 
     RowBox[{
      RowBox[{"out", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}], 
      ",", "2", ",", "7"}], "]"}], "]"}], ",", 
   RowBox[{"PlotRange", "\[Rule]", "All"}], ",", 
   RowBox[{"DisplayFunction", "->", "Identity"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.417409016709*^9, 3.417409051373*^9}}],

Cell[BoxData[
 RowBox[{"Show2x", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"ListPlot3D", "[", 
     RowBox[{
      RowBox[{"Cut3D", "[", 
       RowBox[{"#", ",", "2", ",", "4"}], "]"}], ",", 
      RowBox[{"DisplayFunction", "\[Rule]", "Identity"}], ",", 
      RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}], "&"}], ",", 
   RowBox[{"{", 
    RowBox[{"Bx", ",", "By", ",", "Bz", ",", 
     RowBox[{"Last", "[", "out", "]"}]}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{
  3.3958265119449997`*^9, {3.395999171864998*^9, 3.3959991738109975`*^9}, {
   3.4085240472539997`*^9, 3.408524047384*^9}, {3.409499348512*^9, 
   3.409499360927*^9}}],

Cell[BoxData[{
 RowBox[{"ListLogPlot", "[", 
  RowBox[{"Max", "/@", 
   RowBox[{"Flatten", "/@", 
    SuperscriptBox[
     RowBox[{"out", "[", 
      RowBox[{"[", "1", "]"}], "]"}], "\[Transpose]"]}]}], 
  "]"}], "\[IndentingNewLine]", 
 RowBox[{"ListLogPlot", "[", 
  RowBox[{
   RowBox[{"WithoutFict", "@", 
    SqrtBox[
     RowBox[{"Mean", "/@", 
      SuperscriptBox[
       RowBox[{"(", 
        RowBox[{"Flatten", "/@", 
         SuperscriptBox[
          RowBox[{"out", "[", 
           RowBox[{"[", "1", "]"}], "]"}], "\[Transpose]"]}], ")"}], 
       "2"]}]]}], ",", 
   RowBox[{"Joined", "\[Rule]", "True"}]}], "]"}]}], "Input",
 CellChangeTimes->{{3.43798231509375*^9, 3.43798233225*^9}, {
   3.437982362265625*^9, 3.437982425515625*^9}, {3.437982623421875*^9, 
   3.4379826250625*^9}, 3.437982660109375*^9, {3.43799094353125*^9, 
   3.437990945*^9}, {3.43799268096875*^9, 3.4379926933125*^9}, {
   3.43893433446875*^9, 3.438934358296875*^9}, {3.4390171073125*^9, 
   3.4390171238125*^9}, 3.445688128296875*^9, {3.454743463*^9, 
   3.45474347775*^9}, {3.4556024308125*^9, 3.455602430875*^9}, {
   3.455602484515625*^9, 3.455602505859375*^9}}],

Cell[BoxData[
 RowBox[{"DrawSection", "[", 
  RowBox[{
   RowBox[{"Sequence", "@@", 
    RowBox[{"Take", "[", 
     RowBox[{
      RowBox[{"GetInner", "/@", "out"}], ",", 
      RowBox[{"{", 
       RowBox[{"1", ",", "3"}], "}"}]}], "]"}]}], ",", 
   RowBox[{"PointOfSections", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{"1.5", ",", "0", ",", "0"}], "}"}]}]}], "]"}]], "Input",
 CellChangeTimes->{{3.435648899019875*^9, 3.4356489241605*^9}, {
   3.435650867707375*^9, 3.43565088887925*^9}, {3.437894607578125*^9, 
   3.43789461059375*^9}, {3.43789778196875*^9, 3.437897782328125*^9}, {
   3.437981885859375*^9, 3.437981887515625*^9}, {3.4379906496875*^9, 
   3.437990650078125*^9}, 3.437992724515625*^9, {3.437993083734375*^9, 
   3.4379930853125*^9}, 3.43799464325*^9, {3.444734719*^9, 
   3.44473471915625*^9}, {3.454743300703125*^9, 3.454743301484375*^9}, {
   3.454931858859375*^9, 3.454931858890625*^9}, {3.454991182671875*^9, 
   3.4549911828125*^9}, {3.45543166078125*^9, 3.45543166115625*^9}, {
   3.4619961611459675`*^9, 3.4619961617709675`*^9}, {3.463702564703125*^9, 
   3.463702577125*^9}}],

Cell[BoxData[
 RowBox[{"DrawSection", "[", 
  RowBox[{"vx", ",", "vy", ",", "vz", ",", 
   RowBox[{"PointOfSections", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{"0.5", ",", "0", ",", "0"}], "}"}]}]}], "]"}]], "Input",
 CellChangeTimes->{{3.43618308484375*^9, 3.4361830988125*^9}, {
  3.436183158421875*^9, 3.436183159734375*^9}}],

Cell[BoxData[
 RowBox[{"ListStreamPlot", "[", 
  RowBox[{"Transpose", "[", 
   RowBox[{
    RowBox[{"out", "\[LeftDoubleBracket]", 
     RowBox[{
      RowBox[{"1", ";;", "3", ";;", "2"}], ",", "All", ",", "10"}], 
     "\[RightDoubleBracket]"}], ",", 
    RowBox[{"{", 
     RowBox[{"3", ",", "1", ",", "2"}], "}"}]}], "]"}], "]"}]], "Input",
 CellChangeTimes->{{3.4453334059945*^9, 3.4453334282485*^9}, {
  3.4549319068125*^9, 3.454931921625*^9}}],

Cell[BoxData[
 RowBox[{"DrawSection", "[", 
  RowBox[{"Bx", ",", "By", ",", "Bz", ",", 
   RowBox[{"PointOfSections", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{"0.5", ",", "0", ",", "0"}], "}"}]}]}], "]"}]], "Input",
 CellChangeTimes->{{3.3959993133079977`*^9, 3.3959993288879976`*^9}, {
   3.4085241121809998`*^9, 3.408524116578*^9}, 3.4356493330355*^9, 
   3.435649880519875*^9, 3.435664684363625*^9, {3.437895595125*^9, 
   3.4378956095625*^9}, {3.43789698471875*^9, 3.43789700128125*^9}, {
   3.43894880721875*^9, 3.438948813359375*^9}, {3.445244323203125*^9, 
   3.4452443273125*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"jx", ",", "jy", ",", "jz"}], "}"}], "=", 
   RowBox[{"rotd", "[", 
    RowBox[{"Bx", ",", "By", ",", "Bz", ",", "ghost"}], "]"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.4661298751348753`*^9, 3.4661298858536253`*^9}}],

Cell[BoxData[
 RowBox[{"DrawSection", "[", 
  RowBox[{"jx", ",", "jy", ",", "jz", ",", 
   RowBox[{"PointOfSections", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{"0.5", ",", "0", ",", "0"}], "}"}]}]}], "]"}]], "Input",
 CellChangeTimes->{{3.3959993133079977`*^9, 3.3959993288879976`*^9}, {
   3.4085241121809998`*^9, 3.408524116578*^9}, {3.408524345966*^9, 
   3.408524349671*^9}, 3.435664686738625*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
    RowBox[{"Show4", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"ListPlot3D", "[", 
        RowBox[{
         RowBox[{"Transpose", "[", 
          RowBox[{"Cut3D", "[", "#", "]"}], "]"}], ",", 
         RowBox[{"PlotRange", "\[Rule]", "All"}], ",", 
         RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}], "&"}], 
      ",", 
      RowBox[{"{", 
       RowBox[{"vx", ",", "vy", ",", "vz", ",", 
        SqrtBox[
         RowBox[{
          SuperscriptBox["vx", "2"], "+", 
          SuperscriptBox["vy", "2"], "+", 
          SuperscriptBox["vz", "2"]}]]}], "}"}]}], "]"}], ";"}], "*)"}], "\n", 
  RowBox[{
   RowBox[{"Show2x", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"ListPlot3D", "[", 
       RowBox[{
        RowBox[{"Transpose", "[", 
         RowBox[{"Cut3D", "[", "#", "]"}], "]"}], ",", 
        RowBox[{"PlotRange", "\[Rule]", "All"}], ",", 
        RowBox[{"DisplayFunction", "\[Rule]", "Identity"}], ",", 
        RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], "&"}], ",", 
     RowBox[{"{", 
      RowBox[{"Ax", ",", "Ay", ",", "Az", ",", "nut"}], "}"}]}], "]"}], 
   "\[IndentingNewLine]", 
   RowBox[{"Show2x", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"ListPlot3D", "[", 
       RowBox[{
        RowBox[{"Transpose", "[", 
         RowBox[{"Cut3D", "[", 
          RowBox[{"WithoutFict", "[", "#", "]"}], "]"}], "]"}], ",", 
        RowBox[{"PlotRange", "\[Rule]", "All"}], ",", 
        RowBox[{"DisplayFunction", "\[Rule]", "Identity"}], ",", 
        RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], "&"}], ",", 
     RowBox[{"{", 
      RowBox[{"Bx", ",", "By", ",", "Bz", ",", 
       SqrtBox[
        RowBox[{
         SuperscriptBox["Bx", "2"], "+", 
         SuperscriptBox["By", "2"], "+", 
         SuperscriptBox["Bz", "2"]}]]}], "}"}]}], "]"}], 
   "\[IndentingNewLine]", 
   RowBox[{"Show2x", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"ListPlot3D", "[", 
       RowBox[{
        RowBox[{"Transpose", "[", 
         RowBox[{"Cut3D", "[", 
          RowBox[{"WithoutFict", "[", "#", "]"}], "]"}], "]"}], ",", 
        RowBox[{"PlotRange", "\[Rule]", "All"}], ",", 
        RowBox[{"DisplayFunction", "\[Rule]", "Identity"}], ",", 
        RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], "&"}], ",", 
     RowBox[{"{", 
      RowBox[{"jx", ",", "jy", ",", "jz", ",", 
       SqrtBox[
        RowBox[{
         SuperscriptBox["jx", "2"], "+", 
         SuperscriptBox["jy", "2"], "+", 
         SuperscriptBox["jz", "2"]}]]}], "}"}]}], "]"}]}]}]], "Input",
 CellChangeTimes->{{3.39582776821*^9, 3.3958277796610003`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"dist", "=", "15"}], ";", 
  RowBox[{"PrintRange", "[", 
   RowBox[{"Cut3D", "[", 
    RowBox[{
     RowBox[{"Cut3D", "[", 
      RowBox[{"Bx", ",", "3", ",", "dist"}], "]"}], ",", "1", ",", "dist"}], 
    "]"}], "]"}]}]], "Input",
 CellChangeTimes->{3.39603051309*^9}],

Cell[BoxData[
 RowBox[{"(*", 
  RowBox[{
   RowBox[{"ListPlot3D", "[", 
    RowBox[{"Transpose", "[", 
     RowBox[{"Cut3D", "[", 
      RowBox[{
       FractionBox["Ay", 
        RowBox[{
        "coor", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]], "-", 
       FractionBox[
        RowBox[{"PD", "[", 
         RowBox[{"Ax", ",", "ghost", ",", 
          RowBox[{
          "dx", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], ",", 
          "2"}], "]"}], 
        RowBox[{
        "coor", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]]}], 
      "]"}], "]"}], "]"}], ";", "\[IndentingNewLine]", 
   RowBox[{"ListPlot3D", "[", 
    RowBox[{"Transpose", "[", 
     RowBox[{"Cut3D", "[", 
      RowBox[{"PD", "[", 
       RowBox[{"Ay", ",", "ghost", ",", 
        RowBox[{"dx", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
        ",", "1"}], "]"}], "]"}], "]"}], "]"}], ";"}], "*)"}]], "Input"],

Cell[BoxData[
 RowBox[{"(*", 
  RowBox[{
   RowBox[{
    RowBox[{"Brfi", "[", 
     RowBox[{"r1_", ",", "fi1_", ",", "z1_"}], "]"}], "=", 
    RowBox[{"ReplaceAll", "[", 
     RowBox[{
      RowBox[{
       RowBox[{
        FractionBox["1", "r"], 
        RowBox[{
         SubscriptBox["\[PartialD]", "fi"], 
         RowBox[{"Azi", "[", 
          RowBox[{"r", ",", "fi", ",", "z"}], "]"}]}]}], "-", 
       RowBox[{
        SubscriptBox["\[PartialD]", "z"], 
        RowBox[{"Ayi", "[", 
         RowBox[{"r", ",", "fi", ",", "z"}], "]"}]}]}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"r", "\[Rule]", "r1"}], ",", 
        RowBox[{"fi", "\[Rule]", "fi1"}], ",", 
        RowBox[{"z", "\[Rule]", "z1"}]}], "}"}]}], "]"}]}], ";", 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"B\[Phi]fi", "[", 
     RowBox[{"r1_", ",", "fi1_", ",", "z1_"}], "]"}], "=", 
    RowBox[{"ReplaceAll", "[", 
     RowBox[{
      RowBox[{
       RowBox[{
        SubscriptBox["\[PartialD]", "z"], 
        RowBox[{"Axi", "[", 
         RowBox[{"r", ",", "fi", ",", "z"}], "]"}]}], "-", 
       RowBox[{
        SubscriptBox["\[PartialD]", "r"], 
        RowBox[{"Azi", "[", 
         RowBox[{"r", ",", "fi", ",", "z"}], "]"}]}]}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"r", "\[Rule]", "r1"}], ",", 
        RowBox[{"fi", "\[Rule]", "fi1"}], ",", 
        RowBox[{"z", "\[Rule]", "z1"}]}], "}"}]}], "]"}]}], ";", 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"Bzfi", "[", 
     RowBox[{"r1_", ",", "fi1_", ",", "z1_"}], "]"}], "=", 
    RowBox[{"ReplaceAll", "[", 
     RowBox[{
      RowBox[{
       RowBox[{
        SubscriptBox["\[PartialD]", "r"], 
        RowBox[{"Ayi", "[", 
         RowBox[{"r", ",", "fi", ",", "z"}], "]"}]}], "-", 
       RowBox[{
        FractionBox["1", "r"], 
        RowBox[{
         SubscriptBox["\[PartialD]", "fi"], 
         RowBox[{"Axi", "[", 
          RowBox[{"r", ",", "fi", ",", "z"}], "]"}]}]}], "+", 
       RowBox[{
        FractionBox["1", "r"], 
        RowBox[{"Ayi", "[", 
         RowBox[{"r", ",", "fi", ",", "z"}], "]"}]}]}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"r", "\[Rule]", "r1"}], ",", 
        RowBox[{"fi", "\[Rule]", "fi1"}], ",", 
        RowBox[{"z", "\[Rule]", "z1"}]}], "}"}]}], "]"}]}], ";", 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"Bzfi", "[", 
     RowBox[{"r1_", ",", "fi1_", ",", "z1_"}], "]"}], "=", 
    RowBox[{"ReplaceAll", "[", 
     RowBox[{
      RowBox[{
       RowBox[{
        FractionBox["1", "r"], 
        RowBox[{
         SubscriptBox["\[PartialD]", "r"], 
         RowBox[{"(", 
          RowBox[{"r", " ", 
           RowBox[{"Ayi", "[", 
            RowBox[{"r", ",", "fi", ",", "z"}], "]"}]}], ")"}]}]}], "-", 
       RowBox[{
        FractionBox["1", "r"], 
        RowBox[{
         SubscriptBox["\[PartialD]", "fi"], 
         RowBox[{"Axi", "[", 
          RowBox[{"r", ",", "fi", ",", "z"}], "]"}]}]}]}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"r", "\[Rule]", "r1"}], ",", 
        RowBox[{"fi", "\[Rule]", "fi1"}], ",", 
        RowBox[{"z", "\[Rule]", "z1"}]}], "}"}]}], "]"}]}], ";"}], 
  "*)"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{
    "vxi", ",", "vyi", ",", "vzi", ",", "pi", ",", "Axi", ",", "Ayi", ",", 
     "Azi", ",", "Bxi", ",", "Byi", ",", "Bzi", ",", "jxi", ",", "jyi", ",", 
     "jzi", ",", "nuti"}], "}"}], "=", 
   RowBox[{
    RowBox[{
     RowBox[{"ListInterpolation", "[", 
      RowBox[{"#", ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{"Min", "[", 
            RowBox[{
            "coor", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
            "]"}], ",", 
           RowBox[{"Max", "[", 
            RowBox[{
            "coor", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
            "]"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"Min", "[", 
            RowBox[{
            "coor", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
            "]"}], ",", 
           RowBox[{"Max", "[", 
            RowBox[{
            "coor", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
            "]"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"Min", "[", 
            RowBox[{
            "coor", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
            "]"}], ",", 
           RowBox[{"Max", "[", 
            RowBox[{
            "coor", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
            "]"}]}], "}"}]}], "}"}], ",", 
       StyleBox[
        RowBox[{"InterpolationOrder", "->", "1"}], "MR"]}], "]"}], "&"}], "/@", 
    RowBox[{"{", 
     RowBox[{
     "vx", ",", "vy", ",", "vz", ",", "p", ",", "Ax", ",", "Ay", ",", "Az", 
      ",", "Bx", ",", "By", ",", "Bz", ",", "jx", ",", "jy", ",", "jz", ",", 
      "nut"}], "}"}]}]}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{"Show", "[", 
  RowBox[{
   RowBox[{"GraphicsRow", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"SectionRZ", "[", 
        RowBox[{"vxi", ",", "vyi", ",", "vzi", ",", 
         RowBox[{"0.2`", " ", "\[Pi]"}]}], "]"}], ",", 
       RowBox[{"SectionR\[CapitalPhi]", "[", 
        RowBox[{"vxi", ",", "vyi", ",", "vzi", ",", 
         RowBox[{"Mean", "[", 
          RowBox[{
          "bounds", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
          "]"}], ",", 
         RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "]"}], ",", 
       RowBox[{"Section\[CapitalPhi]Z", "[", 
        RowBox[{"vxi", ",", "vyi", ",", "vzi", ",", 
         RowBox[{"Mean", "[", 
          RowBox[{
          "bounds", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
          "]"}], ",", 
         RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "]"}]}], "}"}], 
     ",", 
     RowBox[{"Spacings", "\[Rule]", 
      RowBox[{"Scaled", "[", "0.`", "]"}]}]}], "]"}], ",", 
   RowBox[{"AspectRatio", "\[Rule]", "1"}]}], "]"}]], "Input",
 CellChangeTimes->{
  3.395861967439*^9, {3.395862029435*^9, 3.395862032208*^9}, {
   3.396025151302*^9, 3.3960251631470003`*^9}, {3.396025214866*^9, 
   3.396025268479*^9}}],

Cell[BoxData[
 RowBox[{"Show", "[", 
  RowBox[{
   RowBox[{"GraphicsRow", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"SectionRZ", "[", 
        RowBox[{"Bxi", ",", "Byi", ",", "Bzi", ",", "1.8`"}], "]"}], ",", 
       RowBox[{"SectionR\[CapitalPhi]", "[", 
        RowBox[{"Bxi", ",", "Byi", ",", "Bzi", ",", 
         RowBox[{"Mean", "[", 
          RowBox[{
          "bounds", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
          "]"}], ",", 
         RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "]"}], ",", 
       RowBox[{"Section\[CapitalPhi]Z", "[", 
        RowBox[{"Bxi", ",", "Byi", ",", "Bzi", ",", 
         RowBox[{"Mean", "[", 
          RowBox[{
          "bounds", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
          "]"}], ",", 
         RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "]"}]}], "}"}], 
     ",", 
     RowBox[{"Spacings", "\[Rule]", 
      RowBox[{"Scaled", "[", "0.`", "]"}]}]}], "]"}], ",", 
   RowBox[{"AspectRatio", "\[Rule]", "1"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.396025293699*^9, 3.3960253253190002`*^9}}],

Cell[BoxData[
 RowBox[{"Show", "[", 
  RowBox[{
   RowBox[{"GraphicsRow", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"SectionRZ", "[", 
        RowBox[{"jxi", ",", "jyi", ",", "jzi", ",", 
         RowBox[{"0.3`", " ", "\[Pi]"}]}], "]"}], ",", 
       RowBox[{"SectionR\[CapitalPhi]", "[", 
        RowBox[{"jxi", ",", "jyi", ",", "jzi", ",", 
         RowBox[{"Mean", "[", 
          RowBox[{
          "bounds", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
          "]"}]}], "]"}], ",", 
       RowBox[{"Section\[CapitalPhi]Z", "[", 
        RowBox[{"jxi", ",", "jyi", ",", "jzi", ",", 
         RowBox[{"Mean", "[", 
          RowBox[{
          "bounds", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
          "]"}]}], "]"}]}], "}"}], ",", 
     RowBox[{"Spacings", "\[Rule]", 
      RowBox[{"Scaled", "[", "0.`", "]"}]}]}], "]"}], ",", 
   RowBox[{"AspectRatio", "\[Rule]", "1"}], ",", 
   RowBox[{"ImageSize", "\[Rule]", "1000"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.396025315835*^9, 3.396025342025*^9}, {
  3.3960253720690002`*^9, 3.3960254024049997`*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["\:0410\:043d\:0438\:043c\:0430\:0446\:0438\:044f \:0441\:0435\:0447\
\:0435\:043d\:0438\:0439", "Subsection",
 CellChangeTimes->{{3.436182721109375*^9, 3.436182722390625*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"coor", ",", "bounds"}], "}"}], "=", 
   RowBox[{"ReadAuxFiles", "[", 
    RowBox[{
     RowBox[{"{", "\"\<coord\>\"", "}"}], ",", 
     RowBox[{"ShiftVector", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"10", ",", "0", ",", "0"}], "}"}]}], ",", 
     RowBox[{"ProcDistrib", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"2", ",", "8", ",", "2"}], "}"}]}], ",", 
     RowBox[{"NumberOfRefs", "\[Rule]", "4"}]}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.466233921941625*^9, 3.466233925754125*^9}, {
  3.466238944879125*^9, 3.466238945004125*^9}, {3.4668391490678*^9, 
  3.4668391715608*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"ReadSection", "[", 
    RowBox[{"iter_", ",", 
     RowBox[{"nproc_Integer:", "1"}], ",", 
     RowBox[{"fluct_:", "False"}]}], "]"}], ":=", 
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"dump", ",", 
       RowBox[{"str", "=", 
        RowBox[{"ToString", "[", "iter", "]"}]}], ",", "Ax", ",", "Ay", ",", 
       "Az"}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"While", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"StringLength", "[", "str", "]"}], "<", "5"}], ",", 
         RowBox[{"str", "=", 
          RowBox[{"\"\<0\>\"", "<>", "str"}]}]}], "]"}], ";"}], "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"dump", "=."}], ";", 
       RowBox[{"ReadBinarySnapFiles", "[", 
        RowBox[{"\"\<ponom_\>\"", ",", 
         RowBox[{"\"\<_\>\"", "<>", "str", "<>", "\"\<.snp\>\""}], ",", "7", 
         ",", "dump", ",", 
         RowBox[{"PrintInfo", "\[Rule]", "None"}]}], "]"}], ";"}], "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"dump", "=."}], ";", 
      RowBox[{"ReadBinarySnapFile", "[", 
       RowBox[{
        RowBox[{"\"\<screw_\>\"", "<>", 
         RowBox[{"ToString", "[", "nproc", "]"}], "<>", "\"\<_\>\"", "<>", 
         "str", "<>", "\"\<.snp\>\""}], ",", "6", ",", "dump", ",", 
        RowBox[{"PrintInfo", "\[Rule]", "None"}]}], "]"}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"If", "[", 
       RowBox[{
        RowBox[{"True", "\[Or]", 
         RowBox[{"!", 
          RowBox[{"NameQ", "[", "coor", "]"}]}], "\[Or]", 
         RowBox[{
          RowBox[{"Length", "[", "coor", "]"}], "=!=", "3"}]}], ",", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"coor", ",", "bounds"}], "}"}], "=", 
         RowBox[{"ReadAuxFiles", "[", 
          RowBox[{
           RowBox[{"{", "\"\<coord\>\"", "}"}], ",", 
           RowBox[{"ShiftVector", "\[Rule]", 
            RowBox[{"{", 
             RowBox[{"10", ",", "0", ",", "0"}], "}"}]}], ",", 
           RowBox[{"ProcDistrib", "\[Rule]", 
            RowBox[{"{", 
             RowBox[{"2", ",", "8", ",", "2"}], "}"}]}], ",", 
           RowBox[{"NumberOfRefs", "\[Rule]", "4"}]}], "]"}]}]}], "]"}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{
        RowBox[{"Return", "[", 
         RowBox[{"Take", "[", 
          RowBox[{"dump", ",", 
           RowBox[{"{", 
            RowBox[{"1", ",", 
             RowBox[{"-", "1"}]}], "}"}]}], "]"}], "]"}], ";"}], "*)"}], 
      "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"Ax", ",", "Ay", ",", "Az"}], "}"}], "=", 
       RowBox[{"Take", "[", 
        RowBox[{"dump", ",", 
         RowBox[{"-", "3"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"If", "[", 
       RowBox[{"fluct", ",", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"Ax", ",", "Ay", ",", "Az"}], "}"}], "-=", 
         RowBox[{"Transpose", "[", 
          RowBox[{
           RowBox[{"Table", "[", 
            RowBox[{
             RowBox[{
              RowBox[{"coor", "\[LeftDoubleBracket]", 
               RowBox[{"1", ",", "i"}], "\[RightDoubleBracket]"}], 
              RowBox[{"Cos", "[", 
               RowBox[{"coor", "\[LeftDoubleBracket]", 
                RowBox[{"2", ",", "j"}], "\[RightDoubleBracket]"}], "]"}], 
              RowBox[{"{", 
               RowBox[{
                RowBox[{"Sin", "[", 
                 RowBox[{"coor", "\[LeftDoubleBracket]", 
                  RowBox[{"2", ",", "j"}], "\[RightDoubleBracket]"}], "]"}], 
                ",", 
                RowBox[{"Cos", "[", 
                 RowBox[{"coor", "\[LeftDoubleBracket]", 
                  RowBox[{"2", ",", "j"}], "\[RightDoubleBracket]"}], "]"}], 
                ",", "0"}], "}"}]}], ",", 
             RowBox[{"{", 
              RowBox[{"i", ",", "1", ",", 
               RowBox[{"n1", "+", 
                RowBox[{"2", "ghost"}]}]}], "}"}], ",", 
             RowBox[{"{", 
              RowBox[{"j", ",", "1", ",", 
               RowBox[{"n2", "+", 
                RowBox[{"2", "ghost"}]}]}], "}"}], ",", 
             RowBox[{"{", 
              RowBox[{"k", ",", "1", ",", 
               RowBox[{"n3", "+", 
                RowBox[{"2", "ghost"}]}]}], "}"}]}], "]"}], ",", 
           RowBox[{"{", 
            RowBox[{"2", ",", "3", ",", "4", ",", "1"}], "}"}]}], "]"}]}]}], 
       "]"}], ";", "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{
        RowBox[{"Return", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}], "=", 
          RowBox[{"rotd", "[", 
           RowBox[{"Ax", ",", "Ay", ",", "Az", ",", "ghost"}], "]"}]}], "]"}],
         ";"}], "*)"}], "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}], "=", 
       RowBox[{"rotc", "[", 
        RowBox[{"Ax", ",", "Ay", ",", "Az", ",", "ghost"}], "]"}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{
        RowBox[{
         RowBox[{"{", 
          RowBox[{"jx", ",", "jy", ",", "jz"}], "}"}], "=", 
         RowBox[{"rotc", "[", 
          RowBox[{"Bx", ",", "By", ",", "Bz", ",", "ghost"}], "]"}]}], ";"}], 
       "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Return", "[", 
       RowBox[{"Join", "[", 
        RowBox[{
         RowBox[{"Take", "[", 
          RowBox[{"dump", ",", "3"}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}]}], "]"}], "]"}], 
      ";"}]}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.3960307107679996`*^9, 3.3960307116689997`*^9}, 
   3.396030778356*^9, {3.396031094078*^9, 3.3960311485550003`*^9}, {
   3.3960311958190002`*^9, 3.3960312012720003`*^9}, {3.3960312806949997`*^9, 
   3.396031294561*^9}, {3.396031330314*^9, 3.3960313310220003`*^9}, {
   3.3960313636219997`*^9, 3.3960313671800003`*^9}, 3.3960374099514*^9, 
   3.409516121436*^9, {3.409516178874*^9, 3.409516254637*^9}, {
   3.409516359733*^9, 3.409516360144*^9}, {3.409596584605*^9, 
   3.409596607484*^9}, {3.411200379608*^9, 3.4112003813129997`*^9}, 
   3.436513033578125*^9, {3.436513207421875*^9, 3.436513236953125*^9}, {
   3.436513269328125*^9, 3.43651326965625*^9}, {3.438067928703125*^9, 
   3.43806796578125*^9}, {3.4619993816875*^9, 3.461999427109375*^9}, {
   3.461999458515625*^9, 3.461999461015625*^9}, {3.462172116203125*^9, 
   3.462172131609375*^9}, {3.466216414301*^9, 3.466216415316625*^9}, {
   3.466234544551*^9, 3.466234556347875*^9}, {3.46623578726975*^9, 
   3.466235793347875*^9}, {3.466236662629125*^9, 3.466236670410375*^9}, {
   3.4664115669007177`*^9, 3.4664115684632177`*^9}, {3.466494022134375*^9, 
   3.466494022790625*^9}, {3.4668391764608*^9, 3.4668391764908*^9}, {
   3.4668392292167997`*^9, 3.4668392409028*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"ReadZipSnap", "[", 
    RowBox[{"iter_", ",", 
     RowBox[{"nproc_Integer:", "1"}]}], "]"}], ":=", 
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"temp", ",", "out"}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"name", "=", "\"\<screw\>\""}], ";", "\[IndentingNewLine]", 
      RowBox[{"temp", "=", 
       RowBox[{"First", "[", 
        RowBox[{"Import", "[", 
         RowBox[{
          RowBox[{"name", "<>", "\"\<_\>\"", "<>", 
           RowBox[{"ToString", "[", "nproc", "]"}], "<>", "\"\<_\>\"", "<>", 
           RowBox[{"ToString", "[", "iter", "]"}], "<>", "\"\<.snp.zip\>\""}],
           ",", 
          RowBox[{"{", 
           RowBox[{"\"\<*.snp\>\"", ",", "\"\<Binary\>\""}], "}"}]}], "]"}], 
        "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"Export", "[", 
       RowBox[{
        RowBox[{"name", "<>", "\"\<_\>\"", "<>", 
         RowBox[{"ToString", "[", "nproc", "]"}], "<>", "\"\<_\>\"", "<>", 
         RowBox[{"ToString", "[", "iter", "]"}], "<>", "\"\<.snp\>\""}], ",", 
        "temp", ",", "\"\<Binary\>\"", ",", 
        RowBox[{"\"\<DataFormat\>\"", "\[Rule]", " ", "\"\<Byte\>\""}]}], 
       "]"}], ";", "\[IndentingNewLine]", 
      RowBox[{"out", "=", 
       RowBox[{"ReadSection", "[", 
        RowBox[{"iter", ",", "nproc"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"Close", "[", 
       RowBox[{"name", "<>", "\"\<_\>\"", "<>", 
        RowBox[{"ToString", "[", "nproc", "]"}], "<>", "\"\<_\>\"", "<>", 
        RowBox[{"ToString", "[", "iter", "]"}], "<>", "\"\<.snp\>\""}], "]"}],
       ";", "\[IndentingNewLine]", 
      RowBox[{"DeleteFile", "[", 
       RowBox[{"name", "<>", "\"\<_\>\"", "<>", 
        RowBox[{"ToString", "[", "nproc", "]"}], "<>", "\"\<_\>\"", "<>", 
        RowBox[{"ToString", "[", "iter", "]"}], "<>", "\"\<.snp\>\""}], "]"}],
       ";", "\[IndentingNewLine]", 
      RowBox[{"Return", "[", "out", "]"}]}]}], "\[IndentingNewLine]", "]"}]}],
   ";"}]], "Input",
 CellChangeTimes->{{3.466314371212*^9, 3.466314400976*^9}, {
  3.4663144899440002`*^9, 3.466314559993*^9}, {3.466314595369*^9, 
  3.4663146142130003`*^9}, {3.46631464512*^9, 3.466314670715*^9}, {
  3.466314751954*^9, 3.466314790572*^9}, {3.466315027289*^9, 
  3.466315049469*^9}, {3.466315820584*^9, 3.466315824578*^9}, {
  3.466315879855*^9, 3.466315881094*^9}, {3.466315995859*^9, 
  3.466315999248*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"grtot", "=", 
   RowBox[{"{", "}"}]}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"nameexp", "=", "\"\<parker\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{"Block", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"g", ",", "dump"}], "}"}], ",", 
   RowBox[{
    RowBox[{"dump", "=", 
     RowBox[{"ReadList", "[", "\"\<runtest1.dmp\>\"", "]"}]}], ";", 
    RowBox[{"np", "=", 
     RowBox[{"dump", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}],
     ";", 
    RowBox[{"KolProc", "=", 
     RowBox[{"Times", "@@", "np"}]}], ";", 
    RowBox[{"dump", "=", 
     RowBox[{"Drop", "[", 
      RowBox[{"dump", ",", 
       RowBox[{"{", "3", "}"}]}], "]"}]}], ";", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "t", ",", "count", ",", "n1", ",", "n2", ",", "n3", ",", "Rey"}], "}"}],
      "=", 
     RowBox[{"Take", "[", 
      RowBox[{"dump", ",", "6"}], "]"}]}], ";", 
    RowBox[{"dump", "=", 
     RowBox[{"Drop", "[", 
      RowBox[{"dump", ",", "6"}], "]"}]}], ";", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "pm", ",", "vxm", ",", "vym", ",", "vzm", ",", "Axm", ",", "Aym", ",", 
       "Azm", ",", "nutm"}], "}"}], "=", 
     RowBox[{"Transpose", "[", 
      RowBox[{"Partition", "[", 
       RowBox[{"dump", ",", "8"}], "]"}], "]"}]}], ";", 
    RowBox[{"ghost", "=", 
     FractionBox[
      RowBox[{
       RowBox[{"Total", "[", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"Last", "[", 
            RowBox[{"Dimensions", "[", "#1", "]"}], "]"}], "&"}], ")"}], "/@", 
         RowBox[{"CutList", "[", 
          RowBox[{"pm", ",", 
           RowBox[{"Last", "[", "np", "]"}]}], "]"}]}], "]"}], "-", "n3"}], 
      RowBox[{"2", " ", 
       RowBox[{"Last", "[", "np", "]"}]}]]}], ";", 
    RowBox[{"coor", "=", 
     RowBox[{"ReadList", "[", 
      RowBox[{"\"\<coord\>\"", ",", "Number", ",", 
       RowBox[{"RecordLists", "\[Rule]", "True"}]}], "]"}]}], ";", 
    RowBox[{"bounds", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{
          RowBox[{
           FractionBox["1", "2"], " ", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{
             "#1", "\[LeftDoubleBracket]", "ghost", "\[RightDoubleBracket]"}],
              "+", 
             RowBox[{"#1", "\[LeftDoubleBracket]", 
              RowBox[{"ghost", "+", "1"}], "\[RightDoubleBracket]"}]}], 
            ")"}]}], ",", 
          RowBox[{
           FractionBox["1", "2"], " ", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"#1", "\[LeftDoubleBracket]", 
              RowBox[{"-", "ghost"}], "\[RightDoubleBracket]"}], "+", 
             RowBox[{"#1", "\[LeftDoubleBracket]", 
              RowBox[{
               RowBox[{"-", "ghost"}], "-", "1"}], 
              "\[RightDoubleBracket]"}]}], ")"}]}]}], "}"}], "&"}], ")"}], "/@",
       "coor"}]}], ";", 
    RowBox[{"Ax", "=", 
     RowBox[{"First", "[", 
      RowBox[{"Fold", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"Map", "[", 
          RowBox[{
           RowBox[{"Function", "[", 
            RowBox[{"m", ",", 
             RowBox[{"Clue", "[", 
              RowBox[{"m", ",", "#2", ",", "ghost"}], "]"}]}], "]"}], ",", 
           RowBox[{"Partition", "[", 
            RowBox[{"#1", ",", 
             RowBox[{
             "np", "\[LeftDoubleBracket]", "#2", "\[RightDoubleBracket]"}]}], 
            "]"}], ",", 
           RowBox[{"{", "1", "}"}]}], "]"}], "&"}], ",", "Axm", ",", 
        RowBox[{"{", 
         RowBox[{"1", ",", "2", ",", "3"}], "}"}]}], "]"}], "]"}]}], ";", 
    RowBox[{"Ay", "=", 
     RowBox[{"First", "[", 
      RowBox[{"Fold", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"Map", "[", 
          RowBox[{
           RowBox[{"Function", "[", 
            RowBox[{"m", ",", 
             RowBox[{"Clue", "[", 
              RowBox[{"m", ",", "#2", ",", "ghost"}], "]"}]}], "]"}], ",", 
           RowBox[{"Partition", "[", 
            RowBox[{"#1", ",", 
             RowBox[{
             "np", "\[LeftDoubleBracket]", "#2", "\[RightDoubleBracket]"}]}], 
            "]"}], ",", 
           RowBox[{"{", "1", "}"}]}], "]"}], "&"}], ",", "Aym", ",", 
        RowBox[{"{", 
         RowBox[{"1", ",", "2", ",", "3"}], "}"}]}], "]"}], "]"}]}], ";", 
    RowBox[{"Az", "=", 
     RowBox[{"First", "[", 
      RowBox[{"Fold", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"Map", "[", 
          RowBox[{
           RowBox[{"Function", "[", 
            RowBox[{"m", ",", 
             RowBox[{"Clue", "[", 
              RowBox[{"m", ",", "#2", ",", "ghost"}], "]"}]}], "]"}], ",", 
           RowBox[{"Partition", "[", 
            RowBox[{"#1", ",", 
             RowBox[{
             "np", "\[LeftDoubleBracket]", "#2", "\[RightDoubleBracket]"}]}], 
            "]"}], ",", 
           RowBox[{"{", "1", "}"}]}], "]"}], "&"}], ",", "Azm", ",", 
        RowBox[{"{", 
         RowBox[{"1", ",", "2", ",", "3"}], "}"}]}], "]"}], "]"}]}], ";", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"Ax", ",", "Ay", ",", "Az"}], "}"}], "-=", 
     RowBox[{"Transpose", "[", 
      RowBox[{
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"coor", "\[LeftDoubleBracket]", 
           RowBox[{"1", ",", "i"}], "\[RightDoubleBracket]"}], " ", 
          RowBox[{"Cos", "[", 
           RowBox[{"coor", "\[LeftDoubleBracket]", 
            RowBox[{"2", ",", "j"}], "\[RightDoubleBracket]"}], "]"}], " ", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"Sin", "[", 
             RowBox[{"coor", "\[LeftDoubleBracket]", 
              RowBox[{"2", ",", "j"}], "\[RightDoubleBracket]"}], "]"}], ",", 
            RowBox[{"Cos", "[", 
             RowBox[{"coor", "\[LeftDoubleBracket]", 
              RowBox[{"2", ",", "j"}], "\[RightDoubleBracket]"}], "]"}], ",", 
            "0"}], "}"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"i", ",", "1", ",", 
           RowBox[{"n1", "+", 
            RowBox[{"2", " ", "ghost"}]}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"j", ",", "1", ",", 
           RowBox[{"n2", "+", 
            RowBox[{"2", " ", "ghost"}]}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"k", ",", "1", ",", 
           RowBox[{"n3", "+", 
            RowBox[{"2", " ", "ghost"}]}]}], "}"}]}], "]"}], ",", 
       RowBox[{"{", 
        RowBox[{"2", ",", "3", ",", "4", ",", "1"}], "}"}]}], "]"}]}], ";", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}], "=", 
     RowBox[{"rotc", "[", 
      RowBox[{"Ax", ",", "Ay", ",", "Az", ",", "ghost"}], "]"}]}], ";", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"jx", ",", "jy", ",", "jz"}], "}"}], "=", 
     RowBox[{"rotc", "[", 
      RowBox[{"Bx", ",", "By", ",", "Bz", ",", "ghost"}], "]"}]}], ";", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "Bxi", ",", "Byi", ",", "Bzi", ",", "jxi", ",", "jyi", ",", "jzi"}], 
      "}"}], "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"ListInterpolation", "[", 
         RowBox[{"#1", ",", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"{", 
             RowBox[{
              RowBox[{"Min", "[", 
               RowBox[{
               "coor", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}],
                "]"}], ",", 
              RowBox[{"Max", "[", 
               RowBox[{
               "coor", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}],
                "]"}]}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"Min", "[", 
               RowBox[{
               "coor", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}],
                "]"}], ",", 
              RowBox[{"Max", "[", 
               RowBox[{
               "coor", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}],
                "]"}]}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"Min", "[", 
               RowBox[{
               "coor", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}],
                "]"}], ",", 
              RowBox[{"Max", "[", 
               RowBox[{
               "coor", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}],
                "]"}]}], "}"}]}], "}"}], ",", 
          RowBox[{"InterpolationOrder", "\[Rule]", "1"}]}], "]"}], "&"}], 
       ")"}], "/@", 
      RowBox[{"{", 
       RowBox[{"Bx", ",", "By", ",", "Bz", ",", "jx", ",", "jy", ",", "jz"}], 
       "}"}]}]}], ";", 
    RowBox[{"g", "=", 
     RowBox[{"GraphicsRow", "[", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"SectionRZ", "[", 
          RowBox[{"Bxi", ",", "Byi", ",", "Bzi", ",", 
           RowBox[{"0.2`", " ", "\[Pi]"}]}], "]"}], ",", 
         RowBox[{"SectionR\[CapitalPhi]", "[", 
          RowBox[{"Bxi", ",", "Byi", ",", "Bzi", ",", 
           RowBox[{"Mean", "[", 
            RowBox[{
            "bounds", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
            "]"}]}], "]"}], ",", 
         RowBox[{"Section\[CapitalPhi]Z", "[", 
          RowBox[{"Bxi", ",", "Byi", ",", "Bzi", ",", 
           RowBox[{"Mean", "[", 
            RowBox[{
            "bounds", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
            "]"}]}], "]"}]}], "}"}], ",", 
       RowBox[{"Spacings", "\[Rule]", 
        RowBox[{"Scaled", "[", "0.`", "]"}]}], ",", 
       RowBox[{"PlotLabel", "\[Rule]", 
        RowBox[{"\"\<t=\>\"", "<>", 
         RowBox[{"ToString", "[", "t", "]"}]}]}]}], "]"}]}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"fname", "=", 
     RowBox[{"nameexp", "<>", "\"\<0000.gif\>\""}]}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"Export", "[", 
     RowBox[{"fname", ",", "g", ",", 
      RowBox[{"ImageResolution", "\[Rule]", "300"}], ",", 
      RowBox[{"ImageSize", "\[Rule]", "640"}]}], "]"}], ";"}]}], 
  "]"}]], "Input",
 CellChangeTimes->{{3.396031741926*^9, 3.3960317709300003`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"ReadSection", "[", 
   RowBox[{"697", ",", "64"}], "]"}], "//", "Dimensions"}]], "Input",
 CellChangeTimes->{{3.462172164703125*^9, 3.462172176265625*^9}, {
  3.466216436551*^9, 3.46621643945725*^9}, {3.466238951551*^9, 
  3.46623896176975*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"6", ",", "70", ",", "70", ",", "70"}], "}"}]], "Output",
 CellChangeTimes->{3.462172201640625*^9, 3.46621645733225*^9, 
  3.466238952941625*^9, 3.466239007676*^9, 3.4664119158538427`*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"ReadZipSnap", "[", 
   RowBox[{"557", ",", "64"}], "]"}], "//", "Dimensions"}]], "Input",
 CellChangeTimes->{{3.4663146173929996`*^9, 3.46631464023*^9}, {
  3.466314681059*^9, 3.466314683224*^9}, {3.466314919427*^9, 
  3.466314921028*^9}, {3.4664018432868*^9, 3.4664018435698*^9}, {
  3.4664081852132177`*^9, 3.4664081957132177`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"nums", "=", 
  RowBox[{"Union", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"ToExpression", "[", 
      RowBox[{"First", "[", 
       RowBox[{"StringCases", "[", 
        RowBox[{"#", ",", 
         RowBox[{
          RowBox[{
          "RegularExpression", "[", 
           "\"\<([^_]+?)_([^_]+?)_([^\\\\.]+?)\\\\.(.*?)\>\"", "]"}], 
          "\[Rule]", "\"\<$3\>\""}]}], "]"}], "]"}], "]"}], "&"}], "/@", 
    RowBox[{"FileNames", "[", "\"\<*.snp\>\"", "]"}]}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"{", "nproc", "}"}], "=", 
  RowBox[{"Union", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"ToExpression", "[", 
      RowBox[{"First", "[", 
       RowBox[{"StringCases", "[", 
        RowBox[{"#", ",", 
         RowBox[{
          RowBox[{
          "RegularExpression", "[", 
           "\"\<([^_]+?)_([^_]+?)_([^\\\\.]+?)\\\\.(.*?)\>\"", "]"}], 
          "\[Rule]", "\"\<$2\>\""}]}], "]"}], "]"}], "]"}], "&"}], "/@", 
    RowBox[{"FileNames", "[", "\"\<*.snp\>\"", "]"}]}], "]"}]}]}], "Input",
 CellChangeTimes->{{3.3960318271870003`*^9, 3.396032011225*^9}, {
  3.4095162687869997`*^9, 3.40951627287*^9}, {3.4325260897019997`*^9, 
  3.4325260898738747`*^9}, {3.44834728540625*^9, 3.448347297578125*^9}, {
  3.4502475760625*^9, 3.4502475775625*^9}, {3.4663142005109997`*^9, 
  3.466314217811*^9}, {3.4664115793694677`*^9, 3.4664115841507177`*^9}, {
  3.466494028853125*^9, 3.46649402943125*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "604", ",", "945", ",", "1329", ",", "1758", ",", "2251", ",", "2859", ",", 
   "3750", ",", "5009", ",", "6420", ",", "7950", ",", "9376", ",", "10821", 
   ",", "12248", ",", "13519", ",", "14627", ",", "15644", ",", "16579", ",", 
   "17386", ",", "18081", ",", "18823", ",", "19560", ",", "20312", ",", 
   "21149", ",", "22166", ",", "23358", ",", "24651", ",", "25866", ",", 
   "27164", ",", "28511", ",", "29926", ",", "31286", ",", "32735", ",", 
   "34186", ",", "35612", ",", "37055", ",", "38583", ",", "39992", ",", 
   "41399", ",", "42810", ",", "44236", ",", "45552", ",", "46870", ",", 
   "48198", ",", "49534", ",", "50873", ",", "52214", ",", "53528", ",", 
   "54847", ",", "56185", ",", "57554", ",", "58897", ",", "60285", ",", 
   "61637", ",", "63032", ",", "64441", ",", "65824", ",", "67237", ",", 
   "68660", ",", "70012", ",", "71385", ",", "72758", ",", "74140", ",", 
   "75520", ",", "76880", ",", "78306", ",", "79679", ",", "81064", ",", 
   "82395", ",", "83783", ",", "85149", ",", "86492", ",", "87851", ",", 
   "89250", ",", "90605", ",", "91965", ",", "93343", ",", "94714", ",", 
   "96109", ",", "97536", ",", "98923", ",", "100323", ",", "101759", ",", 
   "103181", ",", "104528", ",", "105915", ",", "107354", ",", "108701", ",", 
   "110060", ",", "111469", ",", "112792", ",", "114170", ",", "115549", ",", 
   "116965", ",", "118337", ",", "119698", ",", "121078", ",", "122480", ",", 
   "123857", ",", "125272", ",", "126639"}], "}"}]], "Output",
 CellChangeTimes->{
  3.4664115848850927`*^9, {3.4664211836975927`*^9, 3.4664212049475927`*^9}, 
   3.466494029775*^9, {3.4664999672125*^9, 3.466499986134375*^9}, 
   3.4668404809818*^9}],

Cell[BoxData[
 RowBox[{"{", "32", "}"}]], "Output",
 CellChangeTimes->{
  3.4664115848850927`*^9, {3.4664211836975927`*^9, 3.4664212049475927`*^9}, 
   3.466494029775*^9, {3.4664999672125*^9, 3.466499986134375*^9}, 
   3.4668404819058*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"nums", "=", 
   RowBox[{"Drop", "[", 
    RowBox[{"nums", ",", "64"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.466500040446875*^9, 3.466500051525*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"Monitor", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"res", "=", 
     RowBox[{"{", "}"}]}], ";", 
    RowBox[{"Do", "[", 
     RowBox[{
      RowBox[{"AppendTo", "[", 
       RowBox[{"res", ",", 
        RowBox[{"ReadSection", "[", 
         RowBox[{
          RowBox[{
          "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",",
           "nproc"}], "]"}]}], "]"}], ",", 
      RowBox[{"{", 
       RowBox[{"i", ",", 
        RowBox[{"Length", "[", "nums", "]"}]}], "}"}]}], "]"}], ";"}], ",", 
   RowBox[{"nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], 
  "]"}], "\[IndentingNewLine]", 
 RowBox[{"Dimensions", "[", "res", "]"}]}], "Input",
 CellChangeTimes->{{3.43651324096875*^9, 3.436513259109375*^9}, {
  3.43651381121875*^9, 3.43651381165625*^9}, {3.43651384271875*^9, 
  3.43651388415625*^9}, {3.461999450296875*^9, 3.4619994510625*^9}, {
  3.462560449823*^9, 3.462560450783*^9}, {3.4664078433538427`*^9, 
  3.4664078435100927`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"39", ",", "6", ",", "70", ",", "70", ",", "70"}], "}"}]], "Output",
 CellChangeTimes->{3.466225382347875*^9, 3.466234104035375*^9, 
  3.466235499926*^9, 3.46623582895725*^9, 3.466236129316625*^9, 
  3.46624077108225*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"DrawSection", "[", 
  RowBox[{
   RowBox[{"Sequence", "@@", 
    RowBox[{"Take", "[", 
     RowBox[{
      RowBox[{"res", "[", 
       RowBox[{"[", "3", "]"}], "]"}], ",", 
      RowBox[{"{", 
       RowBox[{"2", ",", "4"}], "}"}]}], "]"}]}], ",", 
   RowBox[{"PointOfSections", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{"0.5", ",", "0", ",", "0"}], "}"}]}]}], "]"}]], "Input",
 CellChangeTimes->{{3.436513642015625*^9, 3.436513662109375*^9}, {
  3.436513744296875*^9, 3.436513745453125*^9}, {3.43651706809375*^9, 
  3.436517071953125*^9}, {3.43652199696875*^9, 3.4365220189375*^9}, {
  3.43652205984375*^9, 3.43652206196875*^9}, {3.43652280040625*^9, 
  3.436522802984375*^9}}],

Cell[BoxData[
 RowBox[{"DrawSection", "[", 
  RowBox[{
   RowBox[{"Sequence", "@@", 
    RowBox[{"res", "[", 
     RowBox[{"[", 
      RowBox[{"First", "@", 
       RowBox[{"First", "@", 
        RowBox[{"Position", "[", 
         RowBox[{"nums", ",", "7033"}], "]"}]}]}], "]"}], "]"}]}], ",", 
   RowBox[{"PointOfSections", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{"0.5", ",", "0", ",", "0"}], "}"}]}]}], "]"}]], "Input",
 CellChangeTimes->{{3.438071171375*^9, 3.438071213984375*^9}, {
  3.438071391734375*^9, 3.438071392234375*^9}}],

Cell[BoxData[
 RowBox[{"Manipulate", "[", 
  RowBox[{
   RowBox[{"ListLogPlot", "[", 
    RowBox[{"Max", "/@", 
     RowBox[{"Flatten", "/@", 
      SuperscriptBox[
       RowBox[{"res", "[", 
        RowBox[{"[", 
         RowBox[{"i", ",", "1"}], "]"}], "]"}], "\[Transpose]"]}]}], "]"}], 
   ",", 
   RowBox[{"{", 
    RowBox[{"i", ",", "1", ",", 
     RowBox[{"Length", "[", "nums", "]"}], ",", "1"}], "}"}]}], 
  "]"}]], "Input",
 CellChangeTimes->{{3.4380731429375*^9, 3.438073167875*^9}}],

Cell[BoxData[
 RowBox[{"Manipulate", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"DrawSection", "[", 
     RowBox[{
      RowBox[{"Sequence", "@@", 
       RowBox[{"res", "[", 
        RowBox[{"[", 
         RowBox[{"i", ",", 
          RowBox[{"1", ";;", "3"}]}], "]"}], "]"}]}], ",", 
      RowBox[{"PointOfSections", "\[Rule]", 
       RowBox[{"{", 
        RowBox[{"0.5", ",", "0", ",", "0"}], "}"}]}]}], "]"}], "/.", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"PlotLabel", "\[Rule]", "_String"}], ")"}], "\[Rule]", 
      RowBox[{"(", 
       RowBox[{"PlotLabel", "\[Rule]", 
        RowBox[{"nums", "[", 
         RowBox[{"[", "i", "]"}], "]"}]}], ")"}]}], "}"}]}], ",", 
   RowBox[{"{", 
    RowBox[{"i", ",", "1", ",", 
     RowBox[{"Length", "[", "nums", "]"}], ",", "1"}], "}"}]}], 
  "]"}]], "Input",
 CellChangeTimes->{{3.438068920296875*^9, 3.438068943671875*^9}, {
   3.438068997046875*^9, 3.438069001390625*^9}, {3.438071572984375*^9, 
   3.438071579484375*^9}, {3.466224466160375*^9, 3.46622447376975*^9}, {
   3.466234272504125*^9, 3.466234294754125*^9}, 3.466234418785375*^9, {
   3.46623564333225*^9, 3.4662356453635*^9}, {3.466236736754125*^9, 
   3.4662367376135*^9}}],

Cell[BoxData[
 RowBox[{"Manipulate", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"ListStreamPlot", "[", 
      RowBox[{"Transpose", "[", 
       RowBox[{
        RowBox[{"res", "\[LeftDoubleBracket]", 
         RowBox[{"i", ",", 
          RowBox[{"1", ";;", "3", ";;", "2"}], ",", "All", ",", "10"}], 
         "\[RightDoubleBracket]"}], ",", 
        RowBox[{"{", 
         RowBox[{"3", ",", "1", ",", "2"}], "}"}]}], "]"}], "]"}], ",", 
     RowBox[{"PrintRange", "[", 
      RowBox[{"res", "\[LeftDoubleBracket]", 
       RowBox[{"i", ",", "2", ",", "All", ",", "10", ",", "35"}], 
       "\[RightDoubleBracket]"}], "]"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"i", ",", "1", ",", 
     RowBox[{"Length", "[", "nums", "]"}], ",", "1"}], "}"}]}], 
  "]"}]], "Input",
 CellChangeTimes->{{3.438068920296875*^9, 3.438068943671875*^9}, {
  3.438068997046875*^9, 3.438069001390625*^9}, {3.438071572984375*^9, 
  3.438071579484375*^9}, {3.466224466160375*^9, 3.46622447376975*^9}, {
  3.466225290722875*^9, 3.4662252958635*^9}, {3.466225410176*^9, 
  3.46622541276975*^9}}],

Cell[BoxData[
 RowBox[{"PrintRange", "[", 
  RowBox[{"Log", "[", 
   RowBox[{"Max", "/@", 
    RowBox[{"Transpose", "[", 
     RowBox[{"res", "[", 
      RowBox[{"[", 
       RowBox[{"5", ",", "5"}], "]"}], "]"}], "]"}]}], "]"}], "]"}]], "Input",
 CellChangeTimes->{{3.436611903515625*^9, 3.4366119663125*^9}, {
  3.4664156994319677`*^9, 3.4664157074475927`*^9}, {3.4664157637757177`*^9, 
  3.4664157712132177`*^9}}],

Cell[BoxData[
 RowBox[{"ListPlot3D", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"res", "[", 
     RowBox[{"[", 
      RowBox[{"1", ",", "All", ",", "8"}], "]"}], "]"}], "/.", 
    RowBox[{"{", 
     RowBox[{"0.", "\[Rule]", "0"}], "}"}]}], ",", 
   RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.43652256521875*^9, 3.436522625578125*^9}, {
   3.436526631671875*^9, 3.436526637265625*^9}, {3.436526919171875*^9, 
   3.43652696025*^9}, {3.436527035109375*^9, 3.436527064328125*^9}, {
   3.436598069375*^9, 3.4365980743125*^9}, 3.44568851453125*^9, {
   3.4664157421663427`*^9, 3.4664157516975927`*^9}, {3.4664157848850927`*^9, 
   3.4664157851975927`*^9}}],

Cell[BoxData[
 RowBox[{"ArrayPlot", "[", 
  RowBox[{
   RowBox[{"Cut3D", "[", 
    RowBox[{
     RowBox[{"GetInner", "[", 
      RowBox[{"res", "[", 
       RowBox[{"[", 
        RowBox[{"3", ",", "6"}], "]"}], "]"}], "]"}], ",", "2", ",", "1"}], 
    "]"}], ",", 
   RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.43652211359375*^9, 3.436522389703125*^9}, {
  3.4365266415625*^9, 3.436526645609375*^9}, {3.436526680546875*^9, 
  3.436526721234375*^9}, {3.43652679321875*^9, 3.43652679878125*^9}, {
  3.436602654359375*^9, 3.43660266803125*^9}}],

Cell[BoxData[
 RowBox[{"Monitor", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"Do", "[", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{
       RowBox[{"res", "=", 
        RowBox[{"ReadSection", "[", 
         RowBox[{
          RowBox[{
          "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",",
           "nproc"}], "]"}]}], ";", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"coor", ",", "bounds"}], "}"}], "=", 
        RowBox[{"ReadAuxFiles", "[", 
         RowBox[{
          RowBox[{"{", "\"\<coord\>\"", "}"}], ",", 
          RowBox[{"ShiftVector", "\[Rule]", 
           RowBox[{"{", 
            RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], ",", 
          RowBox[{"ProcDistrib", "\[Rule]", 
           RowBox[{"{", 
            RowBox[{"2", ",", "8", ",", "2"}], "}"}]}], ",", 
          RowBox[{"NumberOfRefs", "\[Rule]", "4"}]}], "]"}]}], ";", 
       "\[IndentingNewLine]", 
       RowBox[{"Export", "[", 
        RowBox[{
         RowBox[{"\"\<velocity\>\"", "<>", 
          RowBox[{"ToString", "[", 
           RowBox[{
           "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
           "]"}], "<>", "\"\<.gif\>\""}], ",", 
         RowBox[{"DrawSection", "[", 
          RowBox[{
           RowBox[{"Sequence", "@@", 
            RowBox[{"Take", "[", 
             RowBox[{"res", ",", 
              RowBox[{"{", 
               RowBox[{"1", ",", "3"}], "}"}]}], "]"}]}], ",", 
           RowBox[{"PointOfSections", "\[Rule]", 
            RowBox[{"{", 
             RowBox[{"0.5", ",", "0", ",", "0"}], "}"}]}]}], "]"}], ",", 
         RowBox[{"ImageResolution", "\[Rule]", "300"}], ",", 
         RowBox[{"ImageSize", "\[Rule]", "640"}]}], "]"}], ";", 
       "\[IndentingNewLine]", 
       RowBox[{"Export", "[", 
        RowBox[{
         RowBox[{"\"\<magnetic\>\"", "<>", 
          RowBox[{"ToString", "[", 
           RowBox[{
           "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
           "]"}], "<>", "\"\<.gif\>\""}], ",", 
         RowBox[{"DrawSection", "[", 
          RowBox[{
           RowBox[{"Sequence", "@@", 
            RowBox[{"Take", "[", 
             RowBox[{"res", ",", 
              RowBox[{"-", "3"}]}], "]"}]}], ",", 
           RowBox[{"PointOfSections", "\[Rule]", 
            RowBox[{"{", 
             RowBox[{"0.5", ",", "0", ",", "0"}], "}"}]}]}], "]"}], ",", 
         RowBox[{"ImageResolution", "\[Rule]", "300"}], ",", 
         RowBox[{"ImageSize", "\[Rule]", "640"}]}], "]"}]}], ",", 
      RowBox[{"{", 
       RowBox[{"i", ",", 
        RowBox[{"Length", "[", "nums", "]"}]}], "}"}]}], "]"}], ";"}], ",", 
   RowBox[{"nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], 
  "]"}]], "Input",
 CellChangeTimes->{{3.43651324096875*^9, 3.436513259109375*^9}, {
   3.43651381121875*^9, 3.43651381165625*^9}, {3.43651384271875*^9, 
   3.43651388415625*^9}, {3.461999450296875*^9, 3.4619994510625*^9}, {
   3.462560449823*^9, 3.462560544054*^9}, {3.4625606854*^9, 
   3.462560699723*^9}, {3.4663158000950003`*^9, 3.466315810264*^9}, {
   3.4664120696975927`*^9, 3.4664120845725927`*^9}, {3.4668392573338003`*^9, 
   3.4668392576038*^9}, 3.4668404757538*^9}],

Cell[BoxData[
 RowBox[{"Import", "@", 
  RowBox[{"Last", "@", 
   RowBox[{"FileNames", "[", "\"\<velocity*.gif\>\"", "]"}]}]}]], "Input",
 CellChangeTimes->{{3.466490779603125*^9, 3.46649079886875*^9}, {
  3.466491111478125*^9, 3.4664911319*^9}}],

Cell[BoxData[
 RowBox[{"Export", "[", 
  RowBox[{"\"\<velocity.gif\>\"", ",", 
   RowBox[{"Flatten", "[", 
    RowBox[{"Import", "/@", 
     RowBox[{"Take", "[", 
      RowBox[{
       RowBox[{"SortBy", "[", 
        RowBox[{
         RowBox[{"FileNames", "[", "\"\<velocity*.gif\>\"", "]"}], ",", 
         RowBox[{
          RowBox[{"ToExpression", "[", 
           RowBox[{"First", "[", 
            RowBox[{"StringCases", "[", 
             RowBox[{"#", ",", 
              RowBox[{
               RowBox[{
               "RegularExpression", "[", "\"\<velocity(\\\\d*?).gif\>\"", 
                "]"}], "\[Rule]", "\"\<0$1\>\""}]}], "]"}], "]"}], "]"}], 
          "&"}]}], "]"}], ",", "50"}], "]"}]}], "]"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.466490084228125*^9, 3.466490146353125*^9}, 
   3.466490521946875*^9, {3.466490948040625*^9, 3.46649095318125*^9}, {
   3.4664910310875*^9, 3.466491031165625*^9}, {3.466491185290625*^9, 
   3.46649118536875*^9}, 3.466491217775*^9, {3.466491464446875*^9, 
   3.466491471525*^9}, {3.466491636571875*^9, 3.466491659321875*^9}, 
   3.46649175143125*^9}],

Cell[BoxData[
 RowBox[{"Do", "[", 
  RowBox[{
   RowBox[{"Export", "[", 
    RowBox[{
     RowBox[{"\"\<velocity\>\"", "<>", 
      RowBox[{"ToString", "[", 
       RowBox[{"nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}],
        "]"}], "<>", "\"\<.gif\>\""}], ",", 
     RowBox[{"DrawSection", "[", 
      RowBox[{
       RowBox[{"Sequence", "@@", 
        RowBox[{"Take", "[", 
         RowBox[{
          RowBox[{
          "res", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", 
          RowBox[{"{", 
           RowBox[{"1", ",", "3"}], "}"}]}], "]"}]}], ",", 
       RowBox[{"PointOfSections", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{"0.5", ",", "0", ",", "0"}], "}"}]}]}], "]"}], ",", 
     RowBox[{"ImageResolution", "\[Rule]", "300"}], ",", 
     RowBox[{"ImageSize", "\[Rule]", "640"}]}], "]"}], ",", 
   RowBox[{"{", 
    RowBox[{"i", ",", 
     RowBox[{"Length", "[", "nums", "]"}]}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.436517120765625*^9, 3.436517127359375*^9}, {
   3.43651743053125*^9, 3.436517500109375*^9}, 3.43651753203125*^9, {
   3.4621722045625*^9, 3.46217220571875*^9}}],

Cell[BoxData[
 RowBox[{"Do", "[", 
  RowBox[{
   RowBox[{"Export", "[", 
    RowBox[{
     RowBox[{"\"\<magnetic\>\"", "<>", 
      RowBox[{"ToString", "[", 
       RowBox[{"nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}],
        "]"}], "<>", "\"\<.gif\>\""}], ",", 
     RowBox[{"DrawSection", "[", 
      RowBox[{
       RowBox[{"Sequence", "@@", 
        RowBox[{"Take", "[", 
         RowBox[{
          RowBox[{
          "res", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", 
          RowBox[{"-", "3"}]}], "]"}]}], ",", 
       RowBox[{"PointOfSections", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{"0.5", ",", "0", ",", "0"}], "}"}]}]}], "]"}], ",", 
     RowBox[{"ImageResolution", "\[Rule]", "300"}], ",", 
     RowBox[{"ImageSize", "\[Rule]", "640"}]}], "]"}], ",", 
   RowBox[{"{", 
    RowBox[{"i", ",", 
     RowBox[{"Length", "[", "nums", "]"}]}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.436518254078125*^9, 3.43651825503125*^9}, {
  3.4365182900625*^9, 3.436518296359375*^9}}],

Cell[BoxData[
 RowBox[{"ListPlot3D", "/@", 
  RowBox[{"Cut3D", "/@", "res"}]}]], "Input",
 CellChangeTimes->{{3.436513547578125*^9, 3.43651356415625*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"lf1", "=", 
   RowBox[{"lf2", "=", 
    RowBox[{"lf3", "=", 
     RowBox[{"lf4", "=", 
      RowBox[{"lf5", "=", 
       RowBox[{"{", "}"}]}]}]}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Monitor", "[", 
   RowBox[{
    RowBox[{"Do", "[", 
     RowBox[{
      RowBox[{"Block", "[", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{
         "Bx", ",", "By", ",", "Bz", ",", "g1", ",", "g2", ",", "fname"}], 
         "}"}], ",", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{
          RowBox[{"{", 
           RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}], "=", 
          RowBox[{"ReadSection", "[", 
           RowBox[{
           "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
           "]"}]}], ";", "\[IndentingNewLine]", 
         RowBox[{"(*", 
          RowBox[{
           RowBox[{"Print", "[", 
            RowBox[{"\"\<have read ponom_\>\"", "<>", 
             RowBox[{"ToString", "[", 
              RowBox[{
              "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
              "]"}], "<>", "\"\<.snp\>\""}], "]"}], ";"}], "*)"}], 
         "\[IndentingNewLine]", 
         RowBox[{"AppendTo", "[", 
          RowBox[{"lf1", ",", 
           RowBox[{"Fourier", "@", 
            RowBox[{"WithoutFict", "@", 
             RowBox[{"Bx", "\[LeftDoubleBracket]", 
              RowBox[{"15", ",", "All", ",", "15"}], 
              "\[RightDoubleBracket]"}]}]}]}], "]"}], ";", 
         "\[IndentingNewLine]", 
         RowBox[{"AppendTo", "[", 
          RowBox[{"lf2", ",", 
           RowBox[{"Fourier", "@", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{
               RowBox[{"Total", "[", 
                RowBox[{"Flatten", "[", 
                 SuperscriptBox["#", "2"], "]"}], "]"}], "&"}], "/@", 
              RowBox[{"Transpose", "[", 
               RowBox[{
                RowBox[{"WithoutFict", "@", "Bx"}], ",", 
                RowBox[{"{", 
                 RowBox[{"2", ",", "1", ",", "3"}], "}"}]}], "]"}]}], 
             ")"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
         RowBox[{"AppendTo", "[", 
          RowBox[{"lf3", ",", 
           RowBox[{"Fourier", "@", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{
               RowBox[{"Total", "[", 
                RowBox[{"Flatten", "[", 
                 SuperscriptBox["#", "2"], "]"}], "]"}], "&"}], "/@", 
              RowBox[{"Transpose", "[", 
               RowBox[{
                RowBox[{"WithoutFict", "@", "By"}], ",", 
                RowBox[{"{", 
                 RowBox[{"2", ",", "1", ",", "3"}], "}"}]}], "]"}]}], 
             ")"}]}]}], "]"}], ";", 
         RowBox[{"AppendTo", "[", 
          RowBox[{"lf4", ",", 
           RowBox[{"Fourier", "@", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{
               RowBox[{"Total", "[", 
                RowBox[{"Flatten", "[", 
                 SuperscriptBox["#", "2"], "]"}], "]"}], "&"}], "/@", 
              RowBox[{"Transpose", "[", 
               RowBox[{
                RowBox[{"WithoutFict", "@", "Bz"}], ",", 
                RowBox[{"{", 
                 RowBox[{"2", ",", "1", ",", "3"}], "}"}]}], "]"}]}], 
             ")"}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ",", 
      RowBox[{"{", 
       RowBox[{"i", ",", "1", ",", 
        RowBox[{"Length", "[", "nums", "]"}]}], "}"}]}], "]"}], ",", 
    RowBox[{"nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], 
   "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.396032024591*^9, 3.396032164275*^9}, {
   3.3960322161429996`*^9, 3.3960322768190002`*^9}, {3.396032432408*^9, 
   3.396032462848*^9}, {3.396032611528*^9, 3.396032650554*^9}, {
   3.396032681407*^9, 3.396032709755*^9}, {3.39603287658*^9, 
   3.396032879454*^9}, {3.396032925429*^9, 3.396032970593*^9}, {
   3.3960366123389997`*^9, 3.3960366143514*^9}, {3.3960407469418*^9, 
   3.3960407573782*^9}, {3.4095162825*^9, 3.409516371366*^9}, {
   3.409516435663*^9, 3.4095164367790003`*^9}, {3.409516871859*^9, 
   3.4095168854630003`*^9}, {3.409518749895*^9, 3.409518779932*^9}, {
   3.409518897043*^9, 3.4095189206940002`*^9}, {3.4095574024440002`*^9, 
   3.409557443428*^9}, {3.409557504564*^9, 3.409557505132*^9}, {
   3.4111958154890003`*^9, 3.4111958830889997`*^9}, 3.4112032257539997`*^9, {
   3.4185414982595634`*^9, 3.418541510526563*^9}, {3.4185415556695633`*^9, 
   3.418541606366563*^9}, {3.418541734930563*^9, 3.418541744356563*^9}, {
   3.4185418897055635`*^9, 3.4185419023995633`*^9}, {3.418541942824563*^9, 
   3.418541944692563*^9}, {3.418541978357563*^9, 3.4185419787785635`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"Monitor", "[", 
   RowBox[{
    RowBox[{"Do", "[", 
     RowBox[{
      RowBox[{"Block", "[", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{
         "Bx", ",", "By", ",", "Bz", ",", "jx", ",", "jy", ",", "jz", ",", 
          "g1", ",", "g2", ",", "fname"}], "}"}], ",", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{
          RowBox[{"{", 
           RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}], "=", 
          RowBox[{"ReadSection", "[", 
           RowBox[{
           "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
           "]"}]}], ";", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"jx", ",", "jy", ",", "jz"}], "}"}], "=", 
          RowBox[{"rotc", "[", 
           RowBox[{"Bx", ",", "By", ",", "Bz", ",", "3"}], "]"}]}], ";", 
         "\[IndentingNewLine]", 
         RowBox[{"(*", 
          RowBox[{
           RowBox[{"Print", "[", 
            RowBox[{"\"\<have read ponom_\>\"", "<>", 
             RowBox[{"ToString", "[", 
              RowBox[{
              "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
              "]"}], "<>", "\"\<.snp\>\""}], "]"}], ";"}], "*)"}], 
         "\[IndentingNewLine]", 
         RowBox[{"g1", "=", 
          RowBox[{"DrawSection", "[", 
           RowBox[{"Bx", ",", "By", ",", "Bz"}], "]"}]}], ";", 
         "\[IndentingNewLine]", 
         RowBox[{"g2", "=", 
          RowBox[{"DrawSection", "[", 
           RowBox[{"jx", ",", "jy", ",", "jz"}], "]"}]}], ";", 
         "\[IndentingNewLine]", 
         RowBox[{"fname", "=", 
          RowBox[{"\"\<ponom\>\"", "<>", 
           RowBox[{"ToString", "[", 
            RowBox[{
            "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
            "]"}], "<>", "\"\<_B.gif\>\""}]}], ";", "\[IndentingNewLine]", 
         RowBox[{"Export", "[", 
          RowBox[{"fname", ",", "g1", ",", 
           RowBox[{"ImageResolution", "\[Rule]", "300"}], ",", 
           RowBox[{"ImageSize", "\[Rule]", "640"}]}], "]"}], ";", 
         "\[IndentingNewLine]", 
         RowBox[{"fname", "=", 
          RowBox[{"\"\<ponom\>\"", "<>", 
           RowBox[{"ToString", "[", 
            RowBox[{
            "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
            "]"}], "<>", "\"\<_j.gif\>\""}]}], ";", "\[IndentingNewLine]", 
         RowBox[{"Export", "[", 
          RowBox[{"fname", ",", "g2", ",", 
           RowBox[{"ImageResolution", "\[Rule]", "300"}], ",", 
           RowBox[{"ImageSize", "\[Rule]", "640"}]}], "]"}], ";"}]}], 
       "\[IndentingNewLine]", "]"}], ",", 
      RowBox[{"{", 
       RowBox[{"i", ",", "1", ",", 
        RowBox[{"Length", "[", "nums", "]"}]}], "}"}]}], "]"}], ",", 
    RowBox[{"nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], 
   "]"}], ";"}]], "Input",
 CellChangeTimes->{{3.396032024591*^9, 3.396032164275*^9}, {
   3.3960322161429996`*^9, 3.3960322768190002`*^9}, {3.396032432408*^9, 
   3.396032462848*^9}, {3.396032611528*^9, 3.396032650554*^9}, {
   3.396032681407*^9, 3.396032709755*^9}, {3.39603287658*^9, 
   3.396032879454*^9}, {3.396032925429*^9, 3.396032970593*^9}, {
   3.3960366123389997`*^9, 3.3960366143514*^9}, {3.3960407469418*^9, 
   3.3960407573782*^9}, {3.4095162825*^9, 3.409516371366*^9}, {
   3.409516435663*^9, 3.4095164367790003`*^9}, {3.409516871859*^9, 
   3.4095168854630003`*^9}, {3.409518749895*^9, 3.409518779932*^9}, {
   3.409518897043*^9, 3.4095189206940002`*^9}, {3.4095574024440002`*^9, 
   3.409557443428*^9}, {3.409557504564*^9, 3.409557505132*^9}, {
   3.4111958154890003`*^9, 3.4111958830889997`*^9}, 3.4112032257539997`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"Do", "[", 
   RowBox[{
    RowBox[{"Block", "[", 
     RowBox[{
      RowBox[{"{", "g", "}"}], ",", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"temp", "=", 
        RowBox[{"First", "[", 
         RowBox[{"Import", "[", 
          RowBox[{
           RowBox[{"\"\<dynamo_2_\>\"", "<>", 
            RowBox[{"ToString", "[", 
             RowBox[{
             "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
             "]"}], "<>", "\"\<.snp.ZIP\>\""}], ",", 
           RowBox[{"{", 
            RowBox[{"\"\<*.snp\>\"", ",", "\"\<Binary\>\""}], "}"}]}], "]"}], 
         "]"}]}], ";", "\[IndentingNewLine]", 
       RowBox[{"Export", "[", 
        RowBox[{
         RowBox[{"\"\<dynamo_2_\>\"", "<>", 
          RowBox[{"ToString", "[", 
           RowBox[{
           "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
           "]"}], "<>", "\"\<.snp\>\""}], ",", "temp", ",", "\"\<Binary\>\"", 
         ",", 
         RowBox[{"\"\<DataFormat\>\"", "\[Rule]", " ", "\"\<Byte\>\""}]}], 
        "]"}], ";", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}], "=", 
        RowBox[{"ReadSection", "[", 
         RowBox[{
         "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
         "]"}]}], ";", "\[IndentingNewLine]", 
       RowBox[{"Print", "[", 
        RowBox[{"\"\<have read dynamo_2_\>\"", "<>", 
         RowBox[{"ToString", "[", 
          RowBox[{
          "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
          "]"}], "<>", "\"\<.snp\>\""}], "]"}], ";", "\[IndentingNewLine]", 
       RowBox[{"Close", "[", 
        RowBox[{"\"\<dynamo_2_\>\"", "<>", 
         RowBox[{"ToString", "[", 
          RowBox[{
          "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
          "]"}], "<>", "\"\<.snp\>\""}], "]"}], ";", "\[IndentingNewLine]", 
       RowBox[{"DeleteFile", "[", 
        RowBox[{"\"\<dynamo_2_\>\"", "<>", 
         RowBox[{"ToString", "[", 
          RowBox[{
          "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
          "]"}], "<>", "\"\<.snp\>\""}], "]"}], ";", "\[IndentingNewLine]", 
       RowBox[{"(*", 
        RowBox[{
         RowBox[{
          RowBox[{"{", 
           RowBox[{
           "Bxi", ",", "Byi", ",", "Bzi", ",", "jxi", ",", "jyi", ",", 
            "jzi"}], "}"}], "=", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"ListInterpolation", "[", 
              RowBox[{"#1", ",", 
               RowBox[{"{", 
                RowBox[{
                 RowBox[{"{", 
                  RowBox[{
                   RowBox[{"Min", "[", 
                    RowBox[{
                    "coor", "\[LeftDoubleBracket]", "1", 
                    "\[RightDoubleBracket]"}], "]"}], ",", 
                   RowBox[{"Max", "[", 
                    RowBox[{
                    "coor", "\[LeftDoubleBracket]", "1", 
                    "\[RightDoubleBracket]"}], "]"}]}], "}"}], ",", 
                 RowBox[{"{", 
                  RowBox[{
                   RowBox[{"Min", "[", 
                    RowBox[{
                    "coor", "\[LeftDoubleBracket]", "2", 
                    "\[RightDoubleBracket]"}], "]"}], ",", 
                   RowBox[{"Max", "[", 
                    RowBox[{
                    "coor", "\[LeftDoubleBracket]", "2", 
                    "\[RightDoubleBracket]"}], "]"}]}], "}"}], ",", 
                 RowBox[{"{", 
                  RowBox[{
                   RowBox[{"Min", "[", 
                    RowBox[{
                    "coor", "\[LeftDoubleBracket]", "3", 
                    "\[RightDoubleBracket]"}], "]"}], ",", 
                   RowBox[{"Max", "[", 
                    RowBox[{
                    "coor", "\[LeftDoubleBracket]", "3", 
                    "\[RightDoubleBracket]"}], "]"}]}], "}"}]}], "}"}], ",", 
               RowBox[{"InterpolationOrder", "\[Rule]", "1"}]}], "]"}], "&"}],
             ")"}], "/@", 
           RowBox[{"{", 
            RowBox[{
            "Bx", ",", "By", ",", "Bz", ",", "jx", ",", "jy", ",", "jz"}], 
            "}"}]}]}], ";", 
         RowBox[{"g", "=", 
          RowBox[{"DisplayTogetherArray", "[", 
           RowBox[{
            RowBox[{"SectionRZ", "[", 
             RowBox[{"Bxi", ",", "Byi", ",", "Bzi", ",", 
              RowBox[{"0.2`", " ", "\[Pi]"}]}], "]"}], ",", 
            RowBox[{"SectionR\[CapitalPhi]", "[", 
             RowBox[{"Bxi", ",", "Byi", ",", "Bzi", ",", 
              RowBox[{"Mean", "[", 
               RowBox[{
               "bounds", "\[LeftDoubleBracket]", "3", 
                "\[RightDoubleBracket]"}], "]"}]}], "]"}], ",", 
            RowBox[{"Section\[CapitalPhi]Z", "[", 
             RowBox[{"Bxi", ",", "Byi", ",", "Bzi", ",", 
              RowBox[{"Mean", "[", 
               RowBox[{
               "bounds", "\[LeftDoubleBracket]", "1", 
                "\[RightDoubleBracket]"}], "]"}]}], "]"}], ",", 
            RowBox[{"Spacings", "\[Rule]", 
             RowBox[{"Scaled", "[", "0.`", "]"}]}], ",", 
            RowBox[{"DisplayFunction", "\[Rule]", "Identity"}], ",", 
            RowBox[{"PlotLabel", "\[Rule]", 
             RowBox[{"\"\<t=\>\"", "<>", 
              RowBox[{"ToString", "[", "t", "]"}]}]}]}], "]"}]}], ";"}], 
        "*)"}], "\[IndentingNewLine]", 
       RowBox[{"g", "=", 
        RowBox[{"DrawSection", "[", 
         RowBox[{"Bx", ",", "By", ",", "Bz"}], "]"}]}], ";", 
       "\[IndentingNewLine]", 
       RowBox[{"fname", "=", 
        RowBox[{"\"\<dynamo\>\"", "<>", 
         RowBox[{"ToString", "[", 
          RowBox[{
          "nums", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
          "]"}], "<>", "\"\<.gif\>\""}]}], ";", 
       RowBox[{"Export", "[", 
        RowBox[{"fname", ",", "g", ",", 
         RowBox[{"ImageResolution", "\[Rule]", "300"}], ",", 
         RowBox[{"ImageSize", "\[Rule]", "640"}]}], "]"}], ";"}]}], "]"}], 
    ",", 
    RowBox[{"{", 
     RowBox[{"i", ",", "1", ",", 
      RowBox[{"Length", "[", "nums", "]"}]}], "}"}]}], "]"}], ";"}]], "Input",
 CellChangeTimes->{{3.396032024591*^9, 3.396032164275*^9}, {
  3.3960322161429996`*^9, 3.3960322768190002`*^9}, {3.396032432408*^9, 
  3.396032462848*^9}, {3.396032611528*^9, 3.396032650554*^9}, {
  3.396032681407*^9, 3.396032709755*^9}, {3.39603287658*^9, 
  3.396032879454*^9}, {3.396032925429*^9, 3.396032970593*^9}, {
  3.3960366123389997`*^9, 3.3960366143514*^9}, {3.3960407469418*^9, 
  3.3960407573782*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"gr", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"{", 
        RowBox[{"Bx", ",", "By", ",", "Bz", ",", "jx", ",", "jy", ",", "jz"}],
         "}"}], "=", 
       RowBox[{"ReadSection", "[", "i", "]"}]}], ";", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
        "Bxi", ",", "Byi", ",", "Bzi", ",", "jxi", ",", "jyi", ",", "jzi"}], 
        "}"}], "=", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"ListInterpolation", "[", 
           RowBox[{"#1", ",", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"{", 
               RowBox[{
                RowBox[{"Min", "[", 
                 RowBox[{
                 "coor", "\[LeftDoubleBracket]", "1", 
                  "\[RightDoubleBracket]"}], "]"}], ",", 
                RowBox[{"Max", "[", 
                 RowBox[{
                 "coor", "\[LeftDoubleBracket]", "1", 
                  "\[RightDoubleBracket]"}], "]"}]}], "}"}], ",", 
              RowBox[{"{", 
               RowBox[{
                RowBox[{"Min", "[", 
                 RowBox[{
                 "coor", "\[LeftDoubleBracket]", "2", 
                  "\[RightDoubleBracket]"}], "]"}], ",", 
                RowBox[{"Max", "[", 
                 RowBox[{
                 "coor", "\[LeftDoubleBracket]", "2", 
                  "\[RightDoubleBracket]"}], "]"}]}], "}"}], ",", 
              RowBox[{"{", 
               RowBox[{
                RowBox[{"Min", "[", 
                 RowBox[{
                 "coor", "\[LeftDoubleBracket]", "3", 
                  "\[RightDoubleBracket]"}], "]"}], ",", 
                RowBox[{"Max", "[", 
                 RowBox[{
                 "coor", "\[LeftDoubleBracket]", "3", 
                  "\[RightDoubleBracket]"}], "]"}]}], "}"}]}], "}"}], ",", 
            RowBox[{"InterpolationOrder", "\[Rule]", "1"}]}], "]"}], "&"}], 
         ")"}], "/@", 
        RowBox[{"{", 
         RowBox[{
         "Bx", ",", "By", ",", "Bz", ",", "jx", ",", "jy", ",", "jz"}], 
         "}"}]}]}], ";", 
      RowBox[{"DisplayTogetherArray", "[", 
       RowBox[{
        RowBox[{"SectionRZ", "[", 
         RowBox[{"Bxi", ",", "Byi", ",", "Bzi", ",", 
          RowBox[{"0.2`", " ", "\[Pi]"}]}], "]"}], ",", 
        RowBox[{"SectionR\[CapitalPhi]", "[", 
         RowBox[{"Bxi", ",", "Byi", ",", "Bzi", ",", 
          RowBox[{"Mean", "[", 
           RowBox[{
           "bounds", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
           "]"}]}], "]"}], ",", 
        RowBox[{"Section\[CapitalPhi]Z", "[", 
         RowBox[{"Bxi", ",", "Byi", ",", "Bzi", ",", 
          RowBox[{"Mean", "[", 
           RowBox[{
           "bounds", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
           "]"}]}], "]"}], ",", 
        RowBox[{"Spacings", "\[Rule]", 
         RowBox[{"Scaled", "[", "0.`", "]"}]}], ",", 
        RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ",", 
     RowBox[{"{", 
      RowBox[{"i", ",", "10", ",", "2820", ",", "10"}], "}"}]}], "]"}]}], 
  ";"}]], "Input"],

Cell[BoxData[
 RowBox[{"grtot", "=", 
  RowBox[{"First", "/@", "gr"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"Export", "[", 
   RowBox[{"\"\<current.gif\>\"", ",", 
    RowBox[{
     RowBox[{
      RowBox[{"Show", "[", 
       RowBox[{"#", ",", 
        RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}], "&"}], "/@",
      "gr"}], ",", 
    RowBox[{"ConversionOptions", "\[Rule]", 
     RowBox[{"{", 
      RowBox[{"\"\<AnimationDisplayTime\>\"", "\[Rule]", "0.2"}], "}"}]}], 
    ",", 
    RowBox[{"ImageResolution", "\[Rule]", "300"}], ",", 
    RowBox[{"ImageSize", "\[Rule]", "640"}]}], "]"}], ";"}]], "Input"]
}, Open  ]],

Cell[CellGroupData[{

Cell["\:0418\:0437\:043e\:043f\:043e\:0432\:0435\:0440\:0445\:043d\:043e\:0441\
\:0442\:0438", "Subsection",
 CellChangeTimes->{{3.436182659171875*^9, 3.43618266040625*^9}}],

Cell[CellGroupData[{

Cell["\:041d\:0430\:0432\:043e\:0440\:043e\:0447\:0435\:043d\:043d\:043e\:0435\
", "Subsubsection",
 CellChangeTimes->{{3.4453341781455*^9, 3.4453341846415*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"{", 
   RowBox[{"cont1", ",", "cont2"}], "}"}], "=", 
  RowBox[{
   RowBox[{
    RowBox[{"0.1", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"Max", "[", "#", "]"}], ",", 
       RowBox[{"Min", "[", "#", "]"}]}], "}"}]}], "&"}], "[", "By", 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.444474853618*^9, 3.444474879174*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"0.012978112906484793`", ",", 
   RowBox[{"-", "0.012968444476084702`"}]}], "}"}]], "Output",
 CellChangeTimes->{{3.444474854207*^9, 3.4444748599560003`*^9}, 
   3.444475215052*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["bounds"], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"-", "2.`"}], ",", "2.`"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0.`", ",", "6.283`"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"-", "2.`"}], ",", "2.`"}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{3.437814712125*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"Bxi", ",", "Byi", ",", "Bzi"}], "}"}], "=", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{
      RowBox[{"ListInterpolation", "[", 
       RowBox[{"#1", ",", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"Min", "[", 
             RowBox[{
             "coor", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
             "]"}], ",", 
            RowBox[{"Max", "[", 
             RowBox[{
             "coor", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
             "]"}]}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"Min", "[", 
             RowBox[{
             "coor", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
             "]"}], ",", 
            RowBox[{"Max", "[", 
             RowBox[{
             "coor", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
             "]"}]}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"Min", "[", 
             RowBox[{
             "coor", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
             "]"}], ",", 
            RowBox[{"Max", "[", 
             RowBox[{
             "coor", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
             "]"}]}], "}"}]}], "}"}], ",", 
        RowBox[{"InterpolationOrder", "\[Rule]", "1"}]}], "]"}], "&"}], ")"}],
     "/@", 
    RowBox[{"{", 
     RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}]}]}], ";"}]], "Input",
 CellChangeTimes->{{3.43781474165625*^9, 3.43781474565625*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"cubic", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"Block", "[", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"r", "=", 
          SqrtBox[
           RowBox[{
            SuperscriptBox["x", "2"], "+", 
            SuperscriptBox["y", "2"]}]]}], ",", 
         RowBox[{"f", "=", 
          RowBox[{
           RowBox[{"ArcTan", "[", 
            RowBox[{"y", ",", 
             RowBox[{"x", "+", 
              SuperscriptBox["10", 
               RowBox[{"-", "10"}]]}]}], "]"}], "+", "\[Pi]"}]}]}], "}"}], 
       ",", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"z", "\[LessEqual]", 
           RowBox[{"bounds", "\[LeftDoubleBracket]", 
            RowBox[{"3", ",", "2"}], "\[RightDoubleBracket]"}]}], "\[And]", 
          RowBox[{"z", "\[GreaterEqual]", 
           RowBox[{"bounds", "\[LeftDoubleBracket]", 
            RowBox[{"3", ",", "1"}], "\[RightDoubleBracket]"}]}], "\[And]", 
          RowBox[{"r", "\[LessEqual]", 
           RowBox[{"bounds", "\[LeftDoubleBracket]", 
            RowBox[{"1", ",", "2"}], "\[RightDoubleBracket]"}]}], "\[And]", 
          RowBox[{"r", "\[GreaterEqual]", 
           RowBox[{"bounds", "\[LeftDoubleBracket]", 
            RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}]}]}], ",", 
         RowBox[{"Byi", "[", 
          RowBox[{"r", ",", "f", ",", "z"}], "]"}], ",", "0"}], "]"}]}], 
      "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"z", ",", 
       RowBox[{"-", "1.5"}], ",", "1.5", ",", "0.1"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", 
       RowBox[{"-", "6"}], ",", "6", ",", "0.2"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"y", ",", 
       RowBox[{"-", "6"}], ",", "6", ",", "0.2"}], "}"}]}], "]"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.43781475690625*^9, 3.437814808296875*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"g1", "=", 
   RowBox[{"ColorLighting", "[", 
    RowBox[{
     RowBox[{"ListContourPlot3D", "[", 
      RowBox[{"cubic", ",", 
       RowBox[{"Contours", "\[Rule]", 
        RowBox[{"{", "cont1", "}"}]}]}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"1", ",", "0", ",", "0"}], "}"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"g2", "=", 
   RowBox[{"ColorLighting", "[", 
    RowBox[{
     RowBox[{"ListContourPlot3D", "[", 
      RowBox[{"cubic", ",", 
       RowBox[{"Contours", "\[Rule]", 
        RowBox[{"{", "cont2", "}"}]}]}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0", ",", "1"}], "}"}]}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.437814845015625*^9, 3.437814847671875*^9}}],

Cell[BoxData[
 RowBox[{"Show", "[", 
  RowBox[{"Prepend", "[", 
   RowBox[{
    RowBox[{"ListContourPlot3D", "[", 
     RowBox[{"cubic", ",", 
      RowBox[{"Contours", "\[Rule]", 
       RowBox[{"{", "cont1", "}"}]}]}], "]"}], ",", 
    RowBox[{"Opacity", "[", "0.5", "]"}]}], "]"}], "]"}]], "Input",
 CellChangeTimes->{{3.437814859234375*^9, 3.43781496321875*^9}}],

Cell[BoxData[
 RowBox[{"ListContourPlot3D", "[", 
  RowBox[{"By", ",", 
   RowBox[{"Contours", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{"cont1", ",", "cont2"}], "}"}]}], ",", 
   RowBox[{"ContourStyle", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"Directive", "[", 
       RowBox[{"Yellow", ",", 
        RowBox[{"Opacity", "[", "0.8", "]"}]}], "]"}], ",", 
      RowBox[{"Directive", "[", 
       RowBox[{"Pink", ",", 
        RowBox[{"Opacity", "[", "0.8", "]"}]}], "]"}]}], "}"}]}], ",", 
   RowBox[{"BoxRatios", "\[Rule]", "Automatic"}], ",", 
   RowBox[{"Mesh", "\[Rule]", "False"}], ",", 
   RowBox[{"AxesLabel", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{"x", ",", "y", ",", "z"}], "}"}]}], ",", 
   RowBox[{"DataRange", "\[Rule]", "bounds"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.43781508065625*^9, 3.43781516025*^9}}],

Cell[BoxData[
 RowBox[{"Show", "[", 
  RowBox[{"g1", ",", 
   RowBox[{"Lighting", "\[Rule]", "Automatic"}]}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"Show", "[", 
  RowBox[{
   RowBox[{"Graphics3D", "[", 
    RowBox[{"EdgeForm", "[", "]"}], "]"}], ",", "g1", ",", "g2", ",", 
   RowBox[{"Lighting", "\[Rule]", "None"}]}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"Show", "[", 
  RowBox[{
   RowBox[{"Graphics3D", "[", 
    RowBox[{"EdgeForm", "[", "]"}], "]"}], ",", 
   RowBox[{"ColorLighting", "[", 
    RowBox[{
     RowBox[{"ListContourPlot3D", "[", 
      RowBox[{"cubic", ",", 
       RowBox[{"Contours", "\[Rule]", 
        RowBox[{"{", "cont1", "}"}]}], ",", 
       RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"1", ",", "0", ",", "0"}], "}"}]}], "]"}], ",", 
   RowBox[{"ColorLighting", "[", 
    RowBox[{
     RowBox[{"ListContourPlot3D", "[", 
      RowBox[{"cubic", ",", 
       RowBox[{"Contours", "\[Rule]", 
        RowBox[{"{", "cont2", "}"}]}], ",", 
       RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0", ",", "1"}], "}"}]}], "]"}], ",", 
   RowBox[{"Lighting", "\[Rule]", "None"}]}], "]"}]], "Input"]
}, Closed]],

Cell[CellGroupData[{

Cell["\:041f\:0440\:043e\:0441\:0442\:043e\:0435 \:0440\:0438\:0441\:043e\
\:0432\:0430\:043d\:0438\:0435 \:043f\:043e\:0432\:0435\:0440\:0445\:043d\
\:043e\:0441\:0442\:0435\:0439", "Subsubsection",
 CellChangeTimes->{{3.409341419406*^9, 3.40934143437*^9}, {
  3.4453342055655003`*^9, 3.4453342174905*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}], "=", 
   RowBox[{"WithoutFict", "/@", 
    RowBox[{"{", 
     RowBox[{"Bx", ",", "By", ",", "Bz"}], "}"}]}]}], ";"}]], "Input",
 CellChangeTimes->{{3.439015011703125*^9, 3.4390150206875*^9}, {
  3.439015082390625*^9, 3.439015105390625*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"vx", ",", "vz"}], "}"}], "=", 
   RowBox[{"out", "[", 
    RowBox[{"[", 
     RowBox[{"2", ";;", "4", ";;", "2"}], "]"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.445340244515625*^9, 3.4453402505625*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"mx", "=", 
  RowBox[{"Max", "[", 
   SqrtBox[
    SuperscriptBox["By", "2"]], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"gh", "=", 
  RowBox[{"ListContourPlot3D", "[", 
   RowBox[{"By", ",", 
    RowBox[{"Contours", "\[Rule]", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{"-", "1"}], ",", "1"}], "}"}], 
      RowBox[{"mx", "/", "2"}]}]}], ",", 
    RowBox[{"ContourStyle", "\[Rule]", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"Directive", "[", 
        RowBox[{"Yellow", ",", 
         RowBox[{"Opacity", "[", "0.8", "]"}]}], "]"}], ",", 
       RowBox[{"Directive", "[", 
        RowBox[{"Pink", ",", 
         RowBox[{"Opacity", "[", "0.8", "]"}]}], "]"}]}], "}"}]}], ",", 
    RowBox[{"BoxRatios", "\[Rule]", "Automatic"}], ",", 
    RowBox[{"Mesh", "\[Rule]", "False"}], ",", 
    RowBox[{"AxesLabel", "\[Rule]", 
     RowBox[{"{", 
      RowBox[{"z", ",", "y", ",", "x"}], "}"}]}], ",", 
    RowBox[{"DataRange", "\[Rule]", "bounds"}]}], "]"}]}]}], "Input",
 CellChangeTimes->{{3.4052706022312546`*^9, 3.405270634587781*^9}, {
   3.405270745847765*^9, 3.4052707556819057`*^9}, {3.405271140785658*^9, 
   3.405271143649776*^9}, {3.409341128416*^9, 3.409341144784*^9}, {
   3.40934123341*^9, 3.409341237156*^9}, {3.409341276205*^9, 
   3.409341280727*^9}, {3.409341316645*^9, 3.409341376817*^9}, 
   3.409341434667*^9, 3.444475271358*^9, {3.444536108439*^9, 
   3.444536134924*^9}, {3.444737523699*^9, 3.444737529248*^9}, {
   3.4453290197319*^9, 3.4453290205639*^9}, {3.4453342055664997`*^9, 
   3.4453342810245*^9}, {3.4453344771285*^9, 3.4453344790215*^9}, {
   3.4453350634465*^9, 3.4453350663835*^9}, {3.4453387925495*^9, 
   3.4453388127395*^9}, {3.4453388524035*^9, 3.4453389215125*^9}, {
   3.4453389526025*^9, 3.4453389530945*^9}, 3.4453391195225*^9, {
   3.45474642728125*^9, 3.4547464574375*^9}, {3.4547464880625*^9, 
   3.45474649315625*^9}, {3.45524557784375*^9, 3.455245634765625*^9}, {
   3.4661357818692503`*^9, 3.4661357891817503`*^9}, 3.4661423689942503`*^9}],

Cell[BoxData["0.023596621832499887`"], "Output",
 CellChangeTimes->{
  3.4661289180880003`*^9, {3.4661357667442503`*^9, 3.4661357896348753`*^9}, {
   3.4661423509005003`*^9, 3.4661423692755003`*^9}, 3.4661546048223753`*^9, 
   3.4665099060438004`*^9}]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{"mx", "=", 
   RowBox[{"Max", "[", 
    SqrtBox[
     RowBox[{
      SuperscriptBox["vz", "2"], "+", 
      SuperscriptBox["vx", "2"]}]], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"gh", "=", 
  RowBox[{"ListContourPlot3D", "[", 
   RowBox[{
    SqrtBox[
     RowBox[{
      SuperscriptBox["vx", "2"], "+", 
      SuperscriptBox["vz", "2"]}]], ",", 
    RowBox[{"Contours", "\[Rule]", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{"-", "1"}], ",", "1"}], "}"}], 
      RowBox[{"mx", "/", "1.5"}]}]}], ",", 
    RowBox[{"ContourStyle", "\[Rule]", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"Directive", "[", 
        RowBox[{"Yellow", ",", 
         RowBox[{"Opacity", "[", "0.8", "]"}]}], "]"}], ",", 
       RowBox[{"Directive", "[", 
        RowBox[{"Pink", ",", 
         RowBox[{"Opacity", "[", "0.8", "]"}]}], "]"}]}], "}"}]}], ",", 
    RowBox[{"BoxRatios", "\[Rule]", "Automatic"}], ",", 
    RowBox[{"Mesh", "\[Rule]", "False"}], ",", 
    RowBox[{"AxesLabel", "\[Rule]", 
     RowBox[{"{", 
      RowBox[{"z", ",", "y", ",", "x"}], "}"}]}], ",", 
    RowBox[{"DataRange", "\[Rule]", "bounds"}]}], "]"}]}]}], "Input",
 CellChangeTimes->{{3.4052706022312546`*^9, 3.405270634587781*^9}, {
   3.405270745847765*^9, 3.4052707556819057`*^9}, {3.405271140785658*^9, 
   3.405271143649776*^9}, {3.409341128416*^9, 3.409341144784*^9}, {
   3.40934123341*^9, 3.409341237156*^9}, {3.409341276205*^9, 
   3.409341280727*^9}, {3.409341316645*^9, 3.409341376817*^9}, 
   3.409341434667*^9, 3.444475271358*^9, {3.444536108439*^9, 
   3.444536134924*^9}, {3.444737523699*^9, 3.444737529248*^9}, {
   3.4453290197319*^9, 3.4453290205639*^9}, {3.4453342055664997`*^9, 
   3.4453342810245*^9}, {3.4453344771285*^9, 3.4453344790215*^9}, {
   3.4453350634465*^9, 3.4453350663835*^9}, {3.4453387925495*^9, 
   3.4453388127395*^9}, {3.4453388524035*^9, 3.4453389215125*^9}, {
   3.4453389526025*^9, 3.4453389530945*^9}, 3.4453391195225*^9, {
   3.45474642728125*^9, 3.4547464574375*^9}, {3.4547465143125*^9, 
   3.4547465145625*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"Export", "[", 
   RowBox[{"\"\<magnRe70Rm1000.eps\>\"", ",", "gh", ",", 
    RowBox[{"ImageSize", "\[Rule]", "300"}]}], "]"}], ";"}]], "Input",
 CellChangeTimes->{{3.4631102951486*^9, 3.4631103050546*^9}, {
  3.4631133468115997`*^9, 3.4631133589484*^9}, {3.4631136624393997`*^9, 
  3.463113667993*^9}}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["\<\
\:041f\:0440\:043e\:0441\:043c\:043e\:0442\:0440 \:043c\:0430\:0441\:0441\
\:0438\:0432\:0430 \:0442\:0438\:043f\:043e\:0432 \:044f\:0447\:0435\:0435\
\:043a \:0438 \:043e\:0442\:0440\:0430\:0436\:0435\:043d\:0438\:0439\
\>", "Subsection",
 CellChangeTimes->{{3.436182684609375*^9, 3.4361826938125*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", "node", "}"}], "=", 
   RowBox[{"ReadAuxFiles", "[", 
    RowBox[{"{", "\"\<node\>\"", "}"}], "]"}]}], ";"}]], "Input",
 CellGroupingRules->{GroupTogetherGrouping, 10000.},
 CellChangeTimes->{3.415523029025*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"coor", ",", "bounds", ",", "node", ",", 
     RowBox[{"{", 
      RowBox[{"rr", ",", "rz", ",", "mrr", ",", "mrz"}], "}"}]}], "}"}], "=", 
   RowBox[{"ReadAuxFiles", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"\"\<coord\>\"", ",", "\"\<node\>\"", ",", "\"\<ref\>\""}], 
      "}"}], ",", 
     RowBox[{"NumberOfRefs", "\[Rule]", "4"}], ",", 
     RowBox[{"ProcDistrib", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"1", ",", "2", ",", "2"}], "}"}]}]}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.436203537671*^9, 3.4362035484440002`*^9}, {
  3.4389414785625*^9, 3.438941479328125*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"Union", "[", 
   RowBox[{"Flatten", "[", "node", "]"}], "]"}], "-", "32"}]], "Input",
 CellChangeTimes->{{3.43565589181675*^9, 3.4356558966605*^9}, {
  3.436202971295*^9, 3.436202971632*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"-", "28"}], ",", "4", ",", "8", ",", "12", ",", "20"}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.435655897238625*^9, 3.43618258678125*^9, {3.436202963817*^9, 
   3.436202972168*^9}, 3.438941504765625*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"ArrayPlot", "[", 
  RowBox[{
   RowBox[{"Transpose", "[", 
    RowBox[{"Map", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"BitAnd", "[", 
        RowBox[{
         RowBox[{"Round", "[", "#1", "]"}], ",", "32"}], "]"}], "&"}], ",", 
      "node", ",", 
      RowBox[{"{", "2", "}"}]}], "]"}], "]"}], ",", 
   RowBox[{"FrameTicks", "\[Rule]", "True"}], ",", 
   RowBox[{"Mesh", "\[Rule]", "True"}], ",", 
   RowBox[{"Frame", "\[Rule]", "True"}]}], "]"}]], "Input",
 CellGroupingRules->{$CellContext`GroupTogetherGrouping, 10000.},
 CellChangeTimes->{{3.408520658314*^9, 3.4085206609630003`*^9}, {
   3.408520695631*^9, 3.408520709075*^9}, {3.4085207429309998`*^9, 
   3.4085207429960003`*^9}, {3.415522982582*^9, 3.415522996329*^9}, 
   3.415523029025*^9, {3.435655814488625*^9, 3.435655853457375*^9}, {
   3.436182618390625*^9, 3.436182622703125*^9}, {3.4389415080625*^9, 
   3.438941517421875*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"flag", "=", 
   RowBox[{"8", "+", "64"}]}], ";"}], "\n", 
 RowBox[{"ListDensityPlot", "[", 
  RowBox[{"Transpose", "[", 
   RowBox[{"Map", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"BitAnd", "[", 
       RowBox[{
        RowBox[{"Round", "[", "#1", "]"}], ",", "flag"}], "]"}], "&"}], ",", 
     RowBox[{"nm", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
     ",", 
     RowBox[{"{", "2", "}"}]}], "]"}], "]"}], "]"}], "\n", 
 RowBox[{"ListDensityPlot", "[", 
  RowBox[{"Transpose", "[", 
   RowBox[{"Map", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"BitAnd", "[", 
       RowBox[{
        RowBox[{"Round", "[", "#1", "]"}], ",", "flag"}], "]"}], "&"}], ",", 
     RowBox[{"nm", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
     ",", 
     RowBox[{"{", "2", "}"}]}], "]"}], "]"}], "]"}]}], "Input",
 CellGroupingRules->{GroupTogetherGrouping, 10000.},
 CellChangeTimes->{3.3960371798358*^9, 3.415523029025*^9}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"ghost", "=", "3"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"n1", "=", 
  RowBox[{
   RowBox[{"First", "[", 
    RowBox[{"Dimensions", "[", "node", "]"}], "]"}], "-", 
   RowBox[{"2", "ghost"}]}]}]}], "Input",
 CellChangeTimes->{{3.428077364137*^9, 3.4280773715030003`*^9}, {
  3.4280774806429996`*^9, 3.428077481606*^9}, {3.4293355576612*^9, 
  3.4293355580772*^9}, {3.4314198975380974`*^9, 3.4314198990830975`*^9}, {
  3.432280379508*^9, 3.432280379606*^9}, {3.436203105384*^9, 
  3.4362031055810003`*^9}}],

Cell[BoxData["32"], "Output",
 CellChangeTimes->{3.4362031058310003`*^9}]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{"gc", "=", 
   RowBox[{"Graphics", "[", 
    RowBox[{"Circle", "[", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{
         FractionBox["n1", "2"], "+", "ghost", "+", 
         RowBox[{"2", 
          FractionBox["1", "2"]}]}], ",", 
        RowBox[{
         FractionBox["n1", "2"], "+", "ghost", "+", 
         RowBox[{"2", 
          FractionBox["1", "2"]}]}]}], "}"}], ",", 
      FractionBox["n1", "4"]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"gc3d", "=", 
   RowBox[{"ParametricPlot3D", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        FractionBox["n1", "2"], "+", "ghost", "+", 
        FractionBox["1", "2"], "+", 
        RowBox[{
         FractionBox["n1", "4"], 
         RowBox[{"Sin", "[", "t", "]"}]}]}], ",", 
       RowBox[{
        FractionBox["n1", "2"], "+", "ghost", "+", 
        FractionBox["1", "2"], "+", 
        RowBox[{
         FractionBox["n1", "4"], 
         RowBox[{"Cos", "[", "t", "]"}]}]}], ",", "30"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"t", ",", "0", ",", 
       RowBox[{"2", "\[Pi]"}]}], "}"}], ",", 
     RowBox[{"Axes", "\[Rule]", "False"}], ",", 
     RowBox[{"Boxed", "\[Rule]", "False"}]}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{
  3.428077485689*^9, {3.428083369108*^9, 3.42808338116*^9}, {
   3.428083572459*^9, 3.4280836099709997`*^9}, {3.4280836865629997`*^9, 
   3.428083692738*^9}, {3.428083741951*^9, 3.428083745571*^9}, {
   3.4293357393342*^9, 3.4293357531412*^9}, {3.431929004266*^9, 
   3.431929044573*^9}, {3.4319312692019997`*^9, 3.4319313658389997`*^9}, {
   3.432280093749*^9, 3.4322801100880003`*^9}, {3.432281542251*^9, 
   3.432281565802*^9}, {3.43228804875*^9, 3.432288060765625*^9}, {
   3.4362031836870003`*^9, 3.436203192116*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"grnode", "[", "type_", "]"}], ":=", 
  RowBox[{"ListPointPlot3D", "[", 
   RowBox[{
    RowBox[{"BitAnd", "[", 
     RowBox[{"node", ",", "type"}], "]"}], ",", 
    RowBox[{"ColorFunction", "\[Rule]", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"Hue", "[", 
        RowBox[{"1", "-", "#3"}], "]"}], "&"}], ")"}]}], ",", 
    RowBox[{"ViewPoint", "\[Rule]", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0", ",", "\[Infinity]"}], "}"}]}], ",", 
    RowBox[{"PlotStyle", "\[Rule]", 
     RowBox[{"PointSize", "[", "Large", "]"}]}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.428083921005*^9, 3.428083929748*^9}, {3.428084115016*^9,
   3.428084121717*^9}, {3.4280841777679996`*^9, 3.428084281546*^9}, {
  3.4280844124230003`*^9, 3.428084424308*^9}, {3.428084489229*^9, 
  3.4280844895179996`*^9}, {3.4280847956809998`*^9, 3.42808479595*^9}, {
  3.43192914437*^9, 3.431929148252*^9}, {3.431930706632*^9, 
  3.431930721234*^9}, {3.431930790249*^9, 3.43193080291*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"DisplayTogether", "[", 
   RowBox[{
    RowBox[{"ListContourPlot", "[", "node", "]"}], ",", "gc"}], "]"}], 
  ";"}]], "Input",
 CellGroupingRules->{GroupTogetherGrouping, 10000.},
 CellChangeTimes->{3.415523029025*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"Min", "[", "#", "]"}], ",", 
     RowBox[{"Max", "[", "#", "]"}]}], "}"}], "&"}], "/@", 
  RowBox[{"Transpose", "[", 
   RowBox[{"Most", "/@", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"{", 
         RowBox[{
          RowBox[{"rr", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"First", "[", "#", "]"}], ",", 
             RowBox[{"Last", "[", "#", "]"}]}], "]"}], "]"}], ",", 
          RowBox[{"rz", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"First", "[", "#", "]"}], ",", 
             RowBox[{"Last", "[", "#", "]"}]}], "]"}], "]"}], ",", "1"}], 
         "}"}], "&"}], "/@", 
       RowBox[{"Position", "[", 
        RowBox[{"node", ",", "52"}], "]"}]}], "+", "1"}], ")"}]}], 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.436203308591*^9, 3.436203387225*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"12.028`", ",", "26.972`"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"12.028`", ",", "26.972`"}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{{3.436203313988*^9, 3.4362033884709997`*^9}, 
   3.4362035571429996`*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"Show", "[", 
  RowBox[{
   RowBox[{"grnode", "[", "52", "]"}], ",", 
   RowBox[{"Graphics3D", "[", 
    RowBox[{"Point", "[", 
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"{", 
         RowBox[{
          RowBox[{"rr", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"First", "[", "#", "]"}], ",", 
             RowBox[{"Last", "[", "#", "]"}]}], "]"}], "]"}], ",", 
          RowBox[{"rz", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"First", "[", "#", "]"}], ",", 
             RowBox[{"Last", "[", "#", "]"}]}], "]"}], "]"}], ",", "1"}], 
         "}"}], "&"}], "/@", 
       RowBox[{"Position", "[", 
        RowBox[{"node", ",", "52"}], "]"}]}], "+", "1"}], "]"}], "]"}], ",", 
   "gc3d", ",", 
   RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.43620314074*^9, 3.4362031610629997`*^9}, {
  3.436203230861*^9, 3.436203230995*^9}}]
}, Closed]]
},
WindowSize->{940, 521},
WindowMargins->{{6, Automatic}, {Automatic, 11}},
ShowSelection->True,
FrontEndVersion->"7.0 for Microsoft Windows (32-bit) (February 18, 2009)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[545, 20, 115, 2, 31, "Input"],
Cell[CellGroupData[{
Cell[685, 26, 1384, 20, 31, "Input"],
Cell[2072, 48, 209, 3, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[2318, 56, 264, 5, 31, "Input"],
Cell[2585, 63, 227, 3, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[2849, 71, 1137, 18, 31, "Input"],
Cell[3989, 91, 1151, 17, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[5177, 113, 140, 2, 31, "Input"],
Cell[5320, 117, 139, 1, 30, "Output"]
}, Open  ]],
Cell[5474, 121, 80, 2, 31, "Input"],
Cell[CellGroupData[{
Cell[5579, 127, 164, 2, 36, "Subsection"],
Cell[CellGroupData[{
Cell[5768, 133, 877, 25, 92, "Input"],
Cell[6648, 160, 235, 4, 33, "Output"]
}, Open  ]],
Cell[6898, 167, 418, 13, 31, "Input"],
Cell[7319, 182, 878, 19, 92, "Input"],
Cell[8200, 203, 665, 18, 52, "Input"],
Cell[8868, 223, 199, 6, 31, "Input"],
Cell[CellGroupData[{
Cell[9092, 233, 7056, 155, 212, "Input"],
Cell[16151, 390, 1147, 21, 253, "Output"],
Cell[17301, 413, 1243, 23, 243, "Output"],
Cell[18547, 438, 499, 11, 251, "Output"]
}, Open  ]],
Cell[19061, 452, 222, 4, 31, "Input"],
Cell[19286, 458, 281, 6, 31, "Input"],
Cell[19570, 466, 322, 8, 31, "Input"],
Cell[19895, 476, 1395, 37, 101, "Input"],
Cell[21293, 515, 1156, 33, 101, "Input"],
Cell[22452, 550, 1169, 33, 101, "Input"],
Cell[23624, 585, 1369, 36, 101, "Input"],
Cell[24996, 623, 1503, 41, 101, "Input"],
Cell[26502, 666, 741, 21, 47, "Input"],
Cell[27246, 689, 1177, 33, 72, "Input"],
Cell[28426, 724, 1509, 40, 72, "Input"],
Cell[29938, 766, 1359, 36, 52, "Input"],
Cell[31300, 804, 295, 5, 31, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[31632, 814, 165, 2, 36, "Subsection"],
Cell[31800, 818, 540, 16, 31, "Input"],
Cell[CellGroupData[{
Cell[32365, 838, 8788, 160, 152, "Input"],
Cell[41156, 1000, 2028, 30, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[43221, 1035, 326, 6, 31, "Input"],
Cell[43550, 1043, 510, 10, 30, "Output"]
}, Open  ]],
Cell[44075, 1056, 673, 20, 52, "Input"],
Cell[44751, 1078, 270, 7, 31, "Input"],
Cell[45024, 1087, 269, 7, 31, "Input"],
Cell[CellGroupData[{
Cell[45318, 1098, 444, 12, 31, "Input"],
Cell[45765, 1112, 262, 6, 30, "Output"]
}, Open  ]],
Cell[46042, 1121, 1442, 34, 105, "Input"],
Cell[47487, 1157, 1213, 34, 105, "Input"],
Cell[48703, 1193, 155, 3, 31, "Input"],
Cell[48861, 1198, 127, 2, 31, "Input"],
Cell[CellGroupData[{
Cell[49013, 1204, 477, 9, 31, "Input"],
Cell[CellGroupData[{
Cell[49515, 1217, 192, 4, 23, "Print"],
Cell[49710, 1223, 247, 6, 23, "Print"],
Cell[49960, 1231, 481, 10, 23, "Print"],
Cell[50444, 1243, 253, 6, 23, "Print"]
}, Open  ]]
}, Open  ]],
Cell[50724, 1253, 187, 4, 31, "Input"],
Cell[CellGroupData[{
Cell[50936, 1261, 3598, 64, 92, "Input"],
Cell[CellGroupData[{
Cell[54559, 1329, 124, 3, 23, "Print"],
Cell[54686, 1334, 183, 5, 23, "Print"],
Cell[54872, 1341, 192, 5, 23, "Print"],
Cell[55067, 1348, 341, 11, 23, "Print"]
}, Open  ]]
}, Open  ]],
Cell[55435, 1363, 595, 16, 31, "Input"],
Cell[CellGroupData[{
Cell[56055, 1383, 3826, 68, 92, "Input"],
Cell[CellGroupData[{
Cell[59906, 1455, 582, 10, 23, "Print"],
Cell[60491, 1467, 641, 12, 23, "Print"],
Cell[61135, 1481, 648, 12, 23, "Print"],
Cell[61786, 1495, 770, 17, 23, "Print"]
}, Open  ]]
}, Open  ]],
Cell[62583, 1516, 813, 25, 52, "Input"],
Cell[63399, 1543, 10382, 165, 92, "Input"],
Cell[73784, 1710, 706, 15, 38, "Input"],
Cell[74493, 1727, 506, 12, 31, "Input"],
Cell[75002, 1741, 268, 7, 31, "Input"],
Cell[75273, 1750, 891, 25, 52, "Input"],
Cell[CellGroupData[{
Cell[76189, 1779, 1211, 30, 72, "Input"],
Cell[CellGroupData[{
Cell[77425, 1813, 353, 7, 23, "Print"],
Cell[77781, 1822, 395, 8, 23, "Print"],
Cell[78179, 1832, 420, 9, 23, "Print"]
}, Open  ]]
}, Open  ]],
Cell[78626, 1845, 312, 8, 31, "Input"],
Cell[78941, 1855, 363, 7, 31, "Input"],
Cell[CellGroupData[{
Cell[79329, 1866, 415, 10, 31, "Input"],
Cell[79747, 1878, 340, 7, 30, "Output"]
}, Open  ]],
Cell[80102, 1888, 331, 9, 53, "Input"],
Cell[80436, 1899, 438, 12, 53, "Input"],
Cell[80877, 1913, 2849, 79, 213, "Input"],
Cell[83729, 1994, 499, 10, 31, "Input"],
Cell[84231, 2006, 730, 15, 31, "Input"],
Cell[84964, 2023, 318, 6, 31, "Input"],
Cell[85285, 2031, 255, 5, 31, "Input"],
Cell[85543, 2038, 457, 13, 31, "Input"],
Cell[86003, 2053, 137, 3, 31, "Input"],
Cell[CellGroupData[{
Cell[86165, 2060, 280, 8, 31, "Input"],
Cell[86448, 2070, 244, 6, 30, "Output"]
}, Open  ]],
Cell[86707, 2079, 442, 12, 31, "Input"],
Cell[CellGroupData[{
Cell[87174, 2095, 578, 16, 72, "Input"],
Cell[87755, 2113, 205, 5, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[87997, 2123, 463, 12, 52, "Input"],
Cell[88463, 2137, 31, 0, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[88531, 2142, 112, 3, 31, "Input"],
Cell[88646, 2147, 227, 6, 30, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[88922, 2159, 259, 3, 36, "Subsection"],
Cell[89184, 2164, 251, 6, 31, "Input"],
Cell[89438, 2172, 1283, 25, 52, "Input"],
Cell[90724, 2199, 422, 10, 31, "Input"],
Cell[91149, 2211, 479, 12, 31, "Input"],
Cell[91631, 2225, 460, 12, 31, "Input"],
Cell[92094, 2239, 471, 12, 31, "Input"],
Cell[92568, 2253, 429, 10, 31, "Input"],
Cell[93000, 2265, 643, 16, 31, "Input"],
Cell[93646, 2283, 1154, 28, 82, "Input"],
Cell[94803, 2313, 1102, 22, 31, "Input"],
Cell[95908, 2337, 329, 7, 31, "Input"],
Cell[96240, 2346, 449, 11, 31, "Input"],
Cell[96692, 2359, 590, 11, 31, "Input"],
Cell[97285, 2372, 286, 8, 31, "Input"],
Cell[97574, 2382, 402, 8, 31, "Input"],
Cell[97979, 2392, 2631, 72, 185, "Input"],
Cell[100613, 2466, 303, 9, 31, "Input"],
Cell[100919, 2477, 938, 25, 61, "Input"],
Cell[101860, 2504, 3181, 96, 112, "Input"],
Cell[105044, 2602, 1806, 50, 72, "Input"],
Cell[106853, 2654, 1263, 31, 72, "Input"],
Cell[108119, 2687, 1119, 27, 72, "Input"],
Cell[109241, 2716, 1118, 27, 52, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[110396, 2748, 181, 2, 36, "Subsection"],
Cell[110580, 2752, 665, 17, 31, "Input"],
Cell[111248, 2771, 6939, 165, 312, "Input"],
Cell[118190, 2938, 2450, 52, 192, "Input"],
Cell[120643, 2992, 90, 3, 31, "Input"],
Cell[120736, 2997, 86, 2, 31, "Input"],
Cell[120825, 3001, 9866, 264, 439, "Input"],
Cell[CellGroupData[{
Cell[130716, 3269, 280, 6, 31, "Input"],
Cell[130999, 3277, 227, 4, 30, "Output"]
}, Open  ]],
Cell[131241, 3284, 369, 7, 31, "Input"],
Cell[CellGroupData[{
Cell[131635, 3295, 1446, 36, 132, "Input"],
Cell[133084, 3333, 1727, 26, 145, "Output"],
Cell[134814, 3361, 239, 5, 30, "Output"]
}, Open  ]],
Cell[135068, 3369, 194, 5, 31, "Input"],
Cell[CellGroupData[{
Cell[135287, 3378, 1002, 25, 52, "Input"],
Cell[136292, 3405, 260, 5, 30, "Output"]
}, Open  ]],
Cell[136567, 3413, 703, 17, 31, "Input"],
Cell[137273, 3432, 536, 14, 31, "Input"],
Cell[137812, 3448, 495, 15, 38, "Input"],
Cell[138310, 3465, 1211, 31, 52, "Input"],
Cell[139524, 3498, 1092, 26, 52, "Input"],
Cell[140619, 3526, 416, 10, 31, "Input"],
Cell[141038, 3538, 687, 15, 31, "Input"],
Cell[141728, 3555, 580, 14, 31, "Input"],
Cell[142311, 3571, 3225, 76, 152, "Input"],
Cell[145539, 3649, 246, 5, 31, "Input"],
Cell[145788, 3656, 1105, 25, 112, "Input"],
Cell[146896, 3683, 1145, 28, 72, "Input"],
Cell[148044, 3713, 1037, 26, 72, "Input"],
Cell[149084, 3741, 154, 3, 31, "Input"],
Cell[149241, 3746, 4693, 109, 203, "Input"],
Cell[153937, 3857, 3703, 81, 232, "Input"],
Cell[157643, 3940, 6616, 154, 332, "Input"],
Cell[164262, 4096, 3127, 81, 132, "Input"],
Cell[167392, 4179, 82, 2, 31, "Input"],
Cell[167477, 4183, 550, 15, 52, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[168064, 4203, 173, 2, 36, "Subsection"],
Cell[CellGroupData[{
Cell[168262, 4209, 161, 2, 27, "Subsubsection"],
Cell[CellGroupData[{
Cell[168448, 4215, 361, 12, 31, "Input"],
Cell[168812, 4229, 220, 5, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[169069, 4239, 32, 0, 31, "Input"],
Cell[169104, 4241, 326, 11, 30, "Output"]
}, Open  ]],
Cell[169445, 4255, 1627, 46, 72, "Input"],
Cell[171075, 4303, 1888, 50, 118, "Input"],
Cell[172966, 4355, 770, 22, 52, "Input"],
Cell[173739, 4379, 366, 9, 31, "Input"],
Cell[174108, 4390, 846, 21, 72, "Input"],
Cell[174957, 4413, 126, 3, 31, "Input"],
Cell[175086, 4418, 212, 5, 31, "Input"],
Cell[175301, 4425, 902, 23, 52, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[176240, 4453, 307, 4, 21, "Subsubsection"],
Cell[176550, 4459, 341, 9, 31, "Input"],
Cell[176894, 4470, 276, 8, 31, "Input"],
Cell[CellGroupData[{
Cell[177195, 4482, 2036, 43, 106, "Input"],
Cell[179234, 4527, 251, 4, 30, "Output"]
}, Open  ]],
Cell[179500, 4534, 2088, 49, 125, "Input"],
Cell[181591, 4585, 337, 7, 31, "Input"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[181977, 4598, 313, 5, 36, "Subsection"],
Cell[182293, 4605, 262, 7, 31, "Input",
 CellGroupingRules->{GroupTogetherGrouping, 10000.}],
Cell[182558, 4614, 666, 17, 52, "Input"],
Cell[CellGroupData[{
Cell[183249, 4635, 226, 5, 31, "Input"],
Cell[183478, 4642, 260, 7, 30, "Output"]
}, Open  ]],
Cell[183753, 4652, 928, 21, 31, "Input",
 CellGroupingRules->{$CellContext`GroupTogetherGrouping, 10000.}],
Cell[184684, 4675, 979, 27, 72, "Input",
 CellGroupingRules->{GroupTogetherGrouping, 10000.}],
Cell[CellGroupData[{
Cell[185688, 4706, 544, 12, 52, "Input"],
Cell[186235, 4720, 73, 1, 30, "Output"]
}, Open  ]],
Cell[186323, 4724, 1830, 48, 110, "Input"],
Cell[188156, 4774, 1002, 22, 52, "Input"],
Cell[189161, 4798, 253, 7, 31, "Input",
 CellGroupingRules->{GroupTogetherGrouping, 10000.}],
Cell[CellGroupData[{
Cell[189439, 4809, 939, 29, 52, "Input"],
Cell[190381, 4840, 288, 8, 30, "Output"]
}, Open  ]],
Cell[190684, 4851, 964, 27, 52, "Input"]
}, Closed]]
}
]
*)

(* End of internal cache information *)
